temporalFormat
Syntax
temporalFormat(X, format)
Alias: datetimeFormat
Arguments
X is a scalar/vector of temporal data types.
format is a string indicating a temporal format.
Details
Convert a DolphinDB temporal variable to a string with specified format. For details about DolphinDB temporal formats, please check the section Parsing and Format of Temporal Variables.
Examples
$ temporalFormat(2018.02.14,"dd-MM-yyyy");
14-02-2018
$ temporalFormat(2018.02.14,"dd-MMM-yy");
14-FEB-18
$ temporalFormat(02:19:06,"HH.mm.ss");
02.19.06
$ temporalFormat(2018.02.06T13:30:10.001, "y-M-d-H-m-s-SSS");
2018-2-6-13-30-10-001
$ temporalFormat(14:19:06,"hhmmssaa");
021906PM