FormatDateTime
Summary
The FormatDateTime
function formats the date and time.
Syntax
FormatDateTime(<date or date_time or offset_date_time or offset_time or time or zoned_date_time) |
Return Type
String
Details
The FormatDateTime
function uses the Java 8 DateTimeFormatter.ofPatter() method and associated formatting masks.
The available masks depend on the input parameter data type. For example, time masks are unavailable for date data types.
Examples
FormatDateTime(ToDateTime( '2014-01-01T20:15:23' ), 'MM-dd-yyyy' ) '01-01-2014' FormatDateTime(ToDateTime( '2014-01-01T20:15:23' ), 'MM-dd-yyyy G' ) '01-01-2014 AD' FormatDateTime(ToDateTime( '2014-01-01T20:15:23' ), 'HH:mm:ss:SS' ) '20:15:23:00' |