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
| descriptors | output styles | formatting instructions |
|---|---|---|
| YY | 18 | Two-digit year |
| YYYY | 2018 | Four-digit year |
| M | 1-12 | Months, starting from 1 |
| MM | 01-12 | Months, two-digit |
| MMM | Jan-Dec | Abbreviated month names |
| MMMM | Jan-Dec | Full month name |
| D | 1-31 | Day of the month |
| DD | 01-31 | A day in a month, two digits |
| d | 0-6 | Day of the week, Sunday is 0 |
| dd | Su-Sa | The most abbreviated day of the week |
| ddd | Sun-Sat | The abbreviated day of the week |
| dddd | Sunday-Saturday | Day of the week |
| H | 0-23 | Hours |
| HH | 00-23 | Hours, two-digit |
| h | 1-12 | Hours, 12-hour format |
| hh | 01-12 | Hours, 12-hour format, two-digit |
| m | 0-59 | Minutes |
| mm | 00-59 | Minutes, 2-digit |
| s | 0-59 | Seconds |
| ss | 00-59 | Seconds, two digits |
| SSS | 000-999 | Milliseconds, three-digit |
| Z | +05:00 | Offset from UTC, ±HH:mm |
| ZZ | +0500 | Offset from UTC, ±HHmm |
| A | AM PM | |
| a | am pm | |
| LT | 8:02 PM | Preset time format: h:mm A |
| LTS | 8:02:18 PM | Preset time format: h:mm:ss A |
| L | 08/16/2018 | Preset time format: MM/DD/YYYY |
| LL | August 16, 2018 | Preset time format: MMMM D, YYYY |
| LLLL | Thursday, August 16, 2018 8:02 PM | Preset time format: dddd, MMMM D, YYYY h:mm A |
| l | 8/16/2018 | Preset time format: M/D/YYYY |
| ll | Aug 16, 2018 | Preset time format: MMM D, YYYY |
| lll | Aug 16, 2018 8:02 PM | Preset time format: MMM D, YYYY h:mm A |
| llll | Thu, Aug 16, 2018 8:02 PM | Preset time format: ddd, MMM D, YYYY h:mm A |