CTOT() Method



|Visual FoxPro Toolkit for .NET | |

CTOT() Method

Receives a date in string format as a parameter and converts it to a DateTime format

[pic]

This method maps directly to existing functionality in the .NET. Use the code listed in the Implementation section of the help detail instead.

[Visual Basic]

Public Shared Function CTOT(ByVal cDateTime As String) As System.DateTime

[C#]

public static System.DateTime CTOT(string cDateTime)

Example

[Visual Basic]

Dim lcDate As String = "4/12/01"

Dim MyDate As DateTime = CTOT(lcDate) 'converts the string to a DateTime value

[C#]

string lcDate = "4/12/01";

DateTime MyDate = VFPToolkit.dates.CTOT(lcDate); //converts the string to a DateTime value

Implementation

[Visual Basic]

Public Shared Function CTOT(ByVal cDateTime As String) As System.DateTime

Return System.DateTime.Parse(cDateTime)

End Function

[C#]

public static System.DateTime CTOT(string cDateTime)

{

return System.DateTime.Parse(cDateTime);

}

Requirements

Namespace: VFPToolkit

Class: VFPToolkit.dates

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: VFPToolkit (in VFPToolkitNET.dll)

See Also

VFPToolkit.dates Members | VFPToolkit Namespace

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download