SToD Function | |
Convert an ANSI date string to date format.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION SToD(
cDate AS STRING
) AS DATE
public static Date SToD(
string cDate
)
Request Example
View SourceParameters
- cDate
- Type: String
A date in the ANSI format yyyymmdd.
The century digits must be specified.
If cDate contains more than the eight characters required for the date, the extra characters are ignored.
Return Value
Type:
Date
A date in the current SetDateFormat() or SET DATE format. If
cDate is not a valid ANSI date, a NULL_DATE is returned.
Remarks
SToD() is a date function that converts an ANSI date created by the DToS() function back into the standard date format.
Examples
This example displays the ANSI date in default date format:
1? SToD("19981028")
2? SToD("981028")
3? SToD("19981028extra")
See Also