Parameters for DATETIME_FORMAT formula

DATETIME_FORMAT formula presents a datetime value in a specified manner. There are different parameters that can be used to present your DATETIME data field into a preferred format by modifying the highlighted part of the formula: datetime_format({arg},' specified output format'):

Output format Formula example Output expected result Output example Transformations preview
M
DATETIME_FORMAT({arg1},'M')
Month of the year, cardinal nos. 1-12 1 2 ... 11 12

MM
DATETIME_FORMAT({arg},'MM')
Month of the year, cardinal nos. 01-12 01 02 ... 11 12

MMM
DATETIME_FORMAT({arg},'MMM')
Month name, three-letter abbreviation Jan Feb ... Nov Dec

MMMM
DATETIME_FORMAT({arg},'MMMM')
Month name January ... December

Q
DATETIME_FORMAT({arg},'Q')
Quarter of the year, cardinal nos. 1-4 1 2 3

D
DATETIME_FORMAT({arg},'D')
Day of the month, cardinal nos. 1-31 1 2 ... 30 31

Do
DATETIME_FORMAT({arg},'Do')
Day of the month, ordinal nos. 1st-31st 1st 2nd ... 30th 31st

DD
DATETIME_FORMAT({arg},'DD')
Day of the month, cardinal nos. 01-31 01 02 ... 30 31

d
DATETIME_FORMAT({arg},'d')
Day of the week, cardinal nos. 0-6 0 1 ... 5 6

dd
DATETIME_FORMAT({arg},'dd')
Day of the week, two-letter abbreviation Su Mo ... Fr Sa

ddd
DATETIME_FORMAT({arg},'ddd')
Day of the week, three-letter abbreviation Sun Mon ... Fri Sat

dddd
DATETIME_FORMAT({arg},'dddd')
Day of the week Sunday ... Saturday

w
DATETIME_FORMAT({arg},'w')
Week of the year, cardinal nos. 1-53 1 2 ... 52 53

ww
DATETIME_FORMAT({arg},'ww')
Week of the year, cardinal nos. 01-53 01 02 ... 52 53

WW
DATETIME_FORMAT({arg},'WW')
Week of the year (ISO), cardinal nos. 01-53 01 02 ... 52 53

YY
DATETIME_FORMAT({arg},'YY')
Year, last two digits 00 01 ... 98 99

YYYY
DATETIME_FORMAT({arg},'YYYY')
Year 2000 2001 ... 2098 2099

GGGG
DATETIME_FORMAT({arg},'GGGG')
Week year (ISO) 2000 2001 ... 2098 2099

A
DATETIME_FORMAT({arg},'A')
Ante meridiem/post meridiem (majuscule) AM PM

a
DATETIME_FORMAT({arg},'a')
Ante meridiem/post meridiem (miniscule) am pm

H
DATETIME_FORMAT({arg},'H')
Hour, using a 24-hour clock from 0-23 0 1 ... 22 23

HH
DATETIME_FORMAT({arg},'HH')
Hour, using a 24-hour clock from 00-23 00 01 ... 22 23

h
DATETIME_FORMAT({arg},'h')
Hour, using a 12-hour clock from 1-12 1 2 ... 11 12

hh
DATETIME_FORMAT({arg},'hh')
Hour, using a 12-hour clock from 01-12 01 02 ... 11 12

m
DATETIME_FORMAT({arg},'m')
Minute 0 1 ... 58 59

mm
DATETIME_FORMAT({arg},'mm')
Minute 00 01 ... 58 59

s
DATETIME_FORMAT({arg},'s')
Second 0 1 ... 58 59

ss
DATETIME_FORMAT({arg},'ss')
Second 00 01 ... 58 59

SSS
DATETIME_FORMAT({arg},'SSS')

Fractional second 000 001 ... 998 999

Z
DATETIME_FORMAT({arg},'Z')
Time zone relative to GMT, inc. colons -07:00 -06:00 ... +06:00 +07:00

ZZ
DATETIME_FORMAT({arg},'ZZ')
Time zone relative to GMT, not inc. colons -0700 -0600 ... +0600 +0700

X
DATETIME_FORMAT({arg},'X')
Unix timestamp 1360013296


Notes: 

  • The formula supports various combinations of format specifiers:
    • For example, 1991-08-24T15:12:52.567Z value of Datetime-formatted cell can be used in a following formula DATETIME_FORMAT({date},'Do of MMMM, YYYY') to generate a result of "24th of August, 1991".
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.