Click or drag to resize

CToDtAnsi Function

X#
Convert an ANSI date string to DateTime

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION CToDtAnsi(
	cDate AS STRING
) AS DateTime
Request Example View Source

Parameters

cDate
Type: String
A string in the ANSI form yyyy.mm.dd, where yy, mm, and dd represent year, month, and day respectively. The year, month, and day can be separated by any character other than a number. cDate is always interpreted as an ANSI string and is not dependent on SetDateFormat() or SetDateCountry(). If the century digits are not specified, the century is determined by the rules of SetEpoch().

Return Value

Type: DateTime
The date value that corresponds to the numbers specified in cDate. If cDate is not a valid ANSI date, CToDAnsi() returns a DateTime.MinValue.
See Also