Convert Date
This stage converts a date from your source into your needed format
Field | Description |
Input Variable | The name of the variable to convert to a date |
Date Format | The date format that the input variable is in (e.g. yyyy-MM-dd[ HH:mm[:ss[.[SSS][SS][S]]]]). See the below table of what you can use. |
Output Name | The name of the variable to store the resulting date in, this will appear as a new variable in the editor for use in the flow |
Output Format | The format that you wish to convert the date into, see below table of what you can use. |
Date and Time Patterns | |||
---|---|---|---|
Input/Output Format | Date or Time Component | Presentation | Examples |
G | Era designator | Text | AD |
y | Year | Year | 1996 ; 96 |
Y | Week year | Year | 2009 ; 09 |
M | Month in year | Month | July ; Jul ; 07 |
w | Week in year | Number | 27 |
W | Week in month | Number | 2 |
D | Day in year | Number | 189 |
d | Day in month | Number | 10 |
F | Day of week in month | Number | 2 |
E | Day name in week | Text | Tuesday ; Tue |
u | Day number of week (1 = Monday, ..., 7 = Sunday) | Number | 1 |
a | Am/pm marker | Text | PM |
H | Hour in day (0-23) | Number | 0 |
k | Hour in day (1-24) | Number | 24 |
K | Hour in am/pm (0-11) | Number | 0 |
h | Hour in am/pm (1-12) | Number | 12 |
m | Minute in hour | Number | 30 |
s | Second in minute | Number | 55 |
S | Millisecond | Number | 978 |
z | Time zone | General time zone | Pacific Standard Time ; PST ; GMT-08:00 |
Z | Time zone | RFC 822 time zone | -0800 |
X | Time zone | ISO 8601 time zone | -08 ; -0800 ; -08:00 |
UNIXMIN UM | Minutes since 1st January 1970 | Number | 28584471 |
UNIXSECOND US | Seconds since 1st January 1970 | Number | 1715068306 |
UNIXMILLI Only for input | Milliseconds since 1st January 1970 | Number | 1715068306000 |
@Now Only for input | Current Unix minutes timestamp | Number | 28584471 |
@NowSecond Only for input | Current Unix second timestamp | Number | 1715068306 |
@UnixMillis Only for input | Current Unix millisecond timestamp | Number | 1715068306000 |
The letter can be repeated to get the desired formatted outcome. For example to get the Year as "2024" then the Output format yyyy shall be used. To get it as "24" then only use yy.
NOTE that all conversions are in UTC when using the UNIX timestamps as input
Example 1:
Input variable: @NowSecond
Date Format: UNIXSECOND
Output name: WeekNumber
Output format: w
This will take the Unixsecond value of @NowSecond and convert it into a week number in the variable {{WeekNumber}} in UTC for use in your flow. "WeekNumber": "29"
Example 2:
Input variable: @NowSecond
Date Format: UNIXSECOND
Output name: DateTimeNow
Output format: yyyy-MM-dd HH:mm:ss
This will take the Unixsecond value of @NowSecond and convert it into a DateTimeNow value {{DateTimeNow}} in UTC for use in your flow. For example: "DateTimeNow": "2024-05-06 13:17:12"