FormatDateTime |
[This is preliminary documentation and is subject to change.]
The FormatDateTime function is used for formatting objects of type datetime into a string
FormatDateTime(dateTimeValue, formattingString)
Result type: String.
Name | Type | Description |
---|---|---|
dateTimeValue | DateTime | The DateTime value that should be formatted. |
formattingString | String | The String value specifying how the DateTime value should be formatted. The FormatDateTime function uses the .Net function DateTime.ToString(string) to accomplish the formatting so the formattinString follows the same rules as for that function. See external links for more info on the possible values of the formattingString |
Formatted string.
Type: String.
FormatDateTime(date, "yyMMdd") - date is 06/08/2010 13:45:30
Result: 100608
FormatDateTime(date, "dddd") - date is 06/08/2010 13:45:30
Result: "tirsdag" (full name of day)
FormatDateTime(date, "D") - date is 06/08/2010 13:45:30
Result: 8. juni 2010