Skip to main content

DATETIME_FORMAT() Supported Date Formats

Formats the date as the specified string.

DATETIME_FORMAT(date, format)

Parameter description

date: The date text to be formatted. format: The format of the output date.For example, DD-MM-YYYY, YYYY / MM / DD, MM.DD, etc.


Example

// Where "DD" is the day of the month, two digits; "MM" is the month, two digits; "YYYY" is the year, four digits.
DATETIME_FORMAT ({start time}, "DD-MM-YYYY")

So the output format of the above formula is:
=>"18-07-2020"



List of descriptors

List of date formatting descriptors supported by the dimension table: preset format in the form of the English environment en

descriptorsoutput stylesformatting instructions
YY18Two-digit year
YYYY2018Four-digit year
M1-12Months, starting from 1
MM01-12Months, two-digit
MMMJan-DecAbbreviated month names
MMMMJan-DecFull month name
D1-31Day of the month
DD01-31A day in a month, two digits
d0-6Day of the week, Sunday is 0
ddSu-SaThe most abbreviated day of the week
dddSun-SatThe abbreviated day of the week
ddddSunday-SaturdayDay of the week
H0-23Hours
HH00-23Hours, two-digit
h1-12Hours, 12-hour format
hh01-12Hours, 12-hour format, two-digit
m0-59Minutes
mm00-59Minutes, 2-digit
s0-59Seconds
ss00-59Seconds, two digits
SSS000-999Milliseconds, three-digit
Z+05:00Offset from UTC, ±HH:mm
ZZ+0500Offset from UTC, ±HHmm
AAM PM
aam pm
LT8:02 PMPreset time format: h:mm A
LTS8:02:18 PMPreset time format: h:mm:ss A
L08/16/2018Preset time format: MM/DD/YYYY
LLAugust 16, 2018Preset time format: MMMM D, YYYY
LLLLThursday, August 16, 2018 8:02 PMPreset time format: dddd, MMMM D, YYYY h:mm A
l8/16/2018Preset time format: M/D/YYYY
llAug 16, 2018Preset time format: MMM D, YYYY
lllAug 16, 2018 8:02 PMPreset time format: MMM D, YYYY h:mm A
llllThu, Aug 16, 2018 8:02 PMPreset time format: ddd, MMM D, YYYY h:mm A