ParseDateTime
Parses a datetime string or object
Method Signature
ParseDateTime(date=[any], format=[string], timezone=[string], locale=[string])
Arguments
Argument
Type
Required
Description
Default
date
any
true
the date, datetime string or an object
format
string
false
the format mask to use in parsing
timezone
string
false
the timezone to apply to the parsed datetime
locale
string
false
optional ISO locale string ( e.g. en-US, en_US, es-SA, es_ES, ru-RU, etc ) used to parse localized formats
Examples
Tag Example
<bx:set dateTimeVar = dateTimeFormat( now(), "yyyy.MM.dd HH:nn:ss " ) >
<bx:output>
#parseDateTime( dateTimeVar )#
</bx:output>
Additional Examples
datetime = dateTimeFormat( now(), "yyyy.MM.dd HH:nn:ss" );
dump( ParseDateTime( datetime ) );
Related
Last updated
Was this helpful?