Onetastic Macro Documentation >
>
>
DateTime_ToString DateTime_ToString
Returns a string representation of a date/time value in local or UTC timezone. The format of the string is the following: YYYY-MM-DDTHH-MM-SS.000Z as specified at http://www.w3.org/TR/xmlschema-2/#dateTime.
Syntax
String DateTime_ToString(
DateTime date,
Bool local)
Parameters
- DateTime date
- Date/time value to convert to string.
- Bool local
- Whether to output in local timezone or UTC.
Examples
$date = DateTime_ToString(DateTime(2022, 10, 5, 22, 33), false)
|