
Date and time formatting is a means of controlling the appearance of dates and times when they are displayed.
The way the day, month, and year are arranged depends on the country. The separator used between the different parts of the date can also vary, such as a dots, hyphens, or slashes. Furthermore, specific requirements may determine whether to display a shortened date or include the day of the week.
Similar considerations apply to displaying time. Choose between a 24-hour format or a 12-hour format, and decide whether to include seconds and timezone information.
Date and time formatting allows you to have precise control over how your dates and times are presented.
- Form Elements: Capture Data and Display Data
- Data Types:
Date
,Time
,Datetime
,Date{}
,Time{}
,Datetime{}
Setting display formats
You can set display formats within an Activity or Trigger form. To do this, open the form builder.
On the form, select a Display Data or Capture Data element that uses one of the supported data types. When selected, the right-hand property panel will show options related to that data type.
To set the format, type the desired format string directly into the Display format date or Display format time field in the property panel.
Date display format property
Time display format property
Supported date formats
Date Part | Format Pattern | Example | Display as | Notes |
---|---|---|---|---|
Year | y | 01/01/2024 | 2024 | shows as many digits as necessary (987, 2017) |
yo | 01/01/2024 | 2024th | shows as many digits as necessary (987th, 2017th) | |
yy | 01/01/2024 | 24 | always show year in two digits (87, 17, 09) | |
Month | M | 01/09/2024 | 9 | |
MM | 01/09/2024 | 09 | ||
MMM | 01/09/2024 | Sep | ||
MMMM | 01/09/2024 | September | ||
Day of week | e | 01/09/2024 | 7 | Monday =1, Sunday =7 |
eo | 01/09/2024 | 7th | ||
ee | 01/09/2024 | 07 | ||
eee | 01/09/2024 | Sun | ||
eeee | 01/09/2024 | Sunday | ||
eeeee | 01/09/2024 | S | ||
eeeeee | 01/09/2024 | Su | ||
Day of month | d | 01/09/2024 | 1 | |
d0 | 17/09/2024 | 17th | ||
dd | 01/09/2024 | 01 | ||
Quarter | Q | 28/06/2024 | 2 | |
Qo | 28/06/2024 | 2nd | ||
28/06/2024 | 02 | |||
QQQ | 28/06/2024 | Q2 | ||
QQQQ | 28/06/2024 | 2nd quarter | ||
Era | G | 28/06/2024 | AD | |
GGGG | 28/06/2024 | Anno Domini |
Examples
UK date format
eeee, dd/MM/y
Tuesday, 13/02/2024
US date format
eeee, MM/dd/y
Tuesday, 02/13/2024
European date format
eeee, dd.MM.y
Tuesday, 13.02.2024
Three character (abbreviated) day of week
eee, dd/MM/y
Tue, 13/02/2024
Month as a word
eeee d MMMM y
Tuesday 13 February 2024
Three character (abbreviated) month
eeee d MMM y
Tuesday 13 Feb 2024
Supported time formats
Time Part | Format Pattern | Example | Display as | Notes |
---|---|---|---|---|
Hour (12 hour) | h | 14:00 | 2 | shows as many digits as necessary (2, 11) |
ho | 14:00 | 2nd | shows as many digits as necessary (2nd, 11th) | |
hh | 14:00 | 02 | always show hour in two digits (02, 11) | |
Hour (24 hour) | H | 09:00 | 9 | shows as many digits as necessary (9, 11) |
Ho | 09:00 | 9th | shows as many digits as necessary (9th, 21st) | |
HH | 09:00 | 09 | always show hour in two digits (09, 21) | |
Minute | m | 00:07 | 7 | shows as many digits as necessary (7, 11) |
mo | 00:07 | 7th | shows as many digits as necessary (7th, 11th) | |
mm | 00:07 | 07 | always show minute in two digits (07, 11) | |
Second | s | 00:00:03 | 3 | shows as many digits as necessary (7, 11) |
so | 00:00:03 | 3rd | shows as many digits as necessary (7th, 11th) | |
ss | 00:00:03 | 03 | always show seconds in two digits (07, 11) | |
Day period | a | 07:00:00 | AM | AM or PM (12 hour clock) |
aaa | 07:00:00 | am | am or pm (12 hour clock) | |
aaaa | 07:00:00 | a.m. | a.m. or p.m. (12 hour clock) | |
b | 00:00:00 | midnight | AM, PM, noon or midnight (12 hour clock) | |
bbb | 12:00:00 | noon | am, pm, noon or midnight (12 hour clock) | |
bbbb | 07:00:00 | a.m. | a.m., p.m., noon or midnight (12 hour clock) | |
B | 09:30:00 | in the morning | at night, in the morning, in the afternoon or in the evening | |
Timezone | z | 09:00:00 | 09:30 GMT+1 | |
zzzz | 09:00:00 | 09:30 GMT+01:00 |
Examples
24 Hour time format
HH:mm
14:07
12 Hour time format with am/pm
h:mm aa
2:07 pm
Leading zero for hour
hh:mm aaa
02:07 pm
Supported datetime formats
Date/Time formatting is achieved by combining a date format pattern with a time format pattern, as shown in the following example:
Date and time in 12 Hour time format and timezone
eeee, dd/MM/y 'at' h:mm:ss aaa
Friday, 24/05/2024 at 2:00:00 pm GMT+01:00
Literal text
To include literal text in date and time patterns, enclose it in single quotes 'my literal text'
. To include a single quote within the literal text, double it: 'o''clock'
.