DToC Function | |
Convert a date to a string.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION DToC(
dDate AS DATE
) AS STRING
public static string DToC(
Date dDate
)
Request Example
View SourceParameters
- dDate
- Type: Date
The date value to convert.
Return Value
Type:
String
A string representation of
dDate, formatted in the current date format.
A NULL_DATE returns a string of spaces equal in length to the current date format.
Remarks
DToC() is a date conversion function used for formatting purposes when you want to display the date in the SetDateFormat() or SetDateCountry() format or when a string is required (in a LABEL FORM, for example).
If you need a specialized date format, you can use Transform() or a custom expression.
Since DToS() is in the form of yyyymmdd, it is usually the preferred form for indexing a date in combination with a string.
Examples
These examples show general uses of DToC():
1? TODAY()
2? DTOC(TODAY())
3? "Today is " + DTOC(TODAY())
See Also