FORMAT_DATE
The FORMAT_DATE function is used to format a date time value.
Usable: Value Fields
Syntax: { FORMAT_DATE(( PARAM_1 PARAM_2 PARAM_3 )) }
Parameter | Type | Examples | Description |
---|---|---|---|
PARAM_1 | JSONPath |
| The JSONPath expression representing the date and time that should be formatted |
PARAM_2 | string |
| The format specifier. |
PARAM_3 | string |
| The culture. |
Value Field Example
For example, consider the following data source JSON:
{
"value": "2020-09-01T22:05:45.488+02:00"
}
Use the FORMAT_DATE
function to format the value to a date string
{ FORMAT_DATE(( $.value 'g' 'de-DE' )) }
This will result in 01.09.2020 20:05
Format and Culture Examples
Format Specifier | Culture | Result |
---|---|---|
d | de-DE | 31.10.2008 |
d | en-US | 10/31/2008 |
d | es-ES | 31/10/2008 |
D | de-DE | Freitag, 31. Oktober 2008 |
D | en-US | Friday, October 31, 2008 |
D | fr-FR | vendredi 31 octobre 2008 |
f | en-US | Friday, October 31, 2008 5:04 PM |
F | en-US | Friday, October 31, 2008 5:04:32 PM |
g | en-US | 10/31/2008 5:04 PM |
G | en-US | 10/31/2008 5:04:32 PM |
m | en-US | October 31 |
o | en-US | 2008-10-31T17:04:32.0000000 |
r | en-US | Fri, 31 Oct 2008 17:04:32 GMT |
s | en-US | 2008-10-31T17:04:32 |
t | en-US | 5:04 PM |
T | en-US | 5:04:32 PM |
u | en-US | 2008-10-31 17:04:32Z |
U | en-US | Friday, October 31, 2008 9:04:32 AM |
Y | en-US | October 2008 |