Convert Date

This stage converts a date from your source into your needed format 

Field

Description

Input VariableThe name of the variable to convert to a date
Date FormatThe 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 NameThe 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 FormatThe format that you wish to convert the date into, see below table of what you can use. 

 

 

Date and Time Patterns

  
Input/Output FormatDate or Time ComponentPresentationExamples
GEra designatorTextAD
yYearYear1996; 96
YWeek yearYear2009; 09
MMonth in yearMonthJuly; Jul; 07
wWeek in yearNumber27
WWeek in monthNumber2
DDay in yearNumber189
dDay in monthNumber10
FDay of week in monthNumber2
EDay name in weekTextTuesday; Tue
uDay number of week (1 = Monday, ..., 7 = Sunday)Number1
aAm/pm markerTextPM
HHour in day (0-23)Number0
kHour in day (1-24)Number24
KHour in am/pm (0-11)Number0
hHour in am/pm (1-12)Number12
mMinute in hourNumber30
sSecond in minuteNumber55
SMillisecondNumber978
zTime zoneGeneral time zonePacific Standard Time; PST; GMT-08:00
ZTime zoneRFC 822 time zone-0800
XTime zoneISO 8601 time zone-08; -0800; -08:00
    
UNIXMIN
UM
Minutes since 1st January 1970Number28584471
UNIXSECOND
US
Seconds since 1st January 1970Number1715068306

UNIXMILLI 

Only for input

Milliseconds since 1st January 1970Number1715068306000

@Now

Only for input

Current Unix minutes timestampNumber28584471

@NowSecond

Only for input

Current Unix second timestampNumber1715068306

@UnixMillis

Only for input

Current Unix millisecond timestampNumber1715068306000

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"