Skip to content

Date Helper

Helper component for date and time manipulation.

Categories: helpers

Type: dateHelper/v1


Actions

Add Time

Name: addTime

Add time to the date.

Properties

NameLabelTypeDescriptionRequired
inputDateDateDATE_TIMEtrue
dateFormatDate FormatSTRING
Options EEE MMM dd yyyy HH:mm:ss, EEE MMM dd HH:mm:ss yyyy, MMMM dd yyyy HH:mm:ss, MMMM dd yyyy, MMM dd yyyy, yyyy-MM-dd’T’HH:mm:ss, yyyy-MM-dd HH:mm:ss, yyyy-MM-dd, MM-dd-yyyy, MM/dd/yyyy, MM/dd/yy, dd-MM-yyyy, dd/MM/yyyy, dd/MM/yy, UnixTimestamp
Here’s what each part of the format (eg. YYYY) means: yyyy : Year (4 digits) yy : Year (2 digits) MMMM : Month (full name) MMM : Month (short name) MM : Month (2 digits) EEE : Day (short name) dd : Day (2 digits) HH : Hour (2 digits) mm : Minute (2 digits) ss : Second (2 digits).true
yearYearINTEGERYears to add.false
monthMonthINTEGERMonths to add.false
dayDayINTEGERDays to add.false
hourHourINTEGERHours to add.false
minuteMinuteINTEGERMinutes to add.false
secondSecondINTEGERSeconds to add.false

Example JSON Structure

{
"label" : "Add Time",
"name" : "addTime",
"parameters" : {
"inputDate" : "2021-01-01T00:00:00",
"dateFormat" : "",
"year" : 1,
"month" : 1,
"day" : 1,
"hour" : 1,
"minute" : 1,
"second" : 1
},
"type" : "dateHelper/v1/addTime"
}

Output

Type: STRING

Convert Date Timestamp

Name: convertUnixTimestampToIso8601

Converts UNIX timestamp to ISO8601 format.

Properties

NameLabelTypeDescriptionRequired
dateTimestampUNIX TimestampNUMBERUNIX Timestamp in seconds (10 digits) or milliseconds (13 digits)true
dateFormatDate FormatSTRING
Options yyyy-MM-dd’T’HH:mm:ss.SSSZ, yyyy-MM-dd
Formatting that should be applied the text representation of date.true

Example JSON Structure

{
"label" : "Convert Date Timestamp",
"name" : "convertUnixTimestampToIso8601",
"parameters" : {
"dateTimestamp" : 0.0,
"dateFormat" : ""
},
"type" : "dateHelper/v1/convertUnixTimestampToIso8601"
}

Output

Type: STRING

Date Difference

Name: dateDifference

Get the difference between two dates.

Properties

NameLabelTypeDescriptionRequired
startDateStart DateDATE_TIMEtrue
endDateEnd DateDATE_TIMEtrue
unitUnitSTRING
Options year, month, day, hour, minute, second
The unit of difference between the two dates.true

Example JSON Structure

{
"label" : "Date Difference",
"name" : "dateDifference",
"parameters" : {
"startDate" : "2021-01-01T00:00:00",
"endDate" : "2021-01-01T00:00:00",
"unit" : ""
},
"type" : "dateHelper/v1/dateDifference"
}

Output

Type: NUMBER

Extract Date Units

Name: extractDateUnits

Extract date units (year/month/day/hour/minute/second/day of week/month name) from a date.

Properties

NameLabelTypeDescriptionRequired
inputDateDateDATE_TIMEtrue
unitUnit to ExtractSTRING
Options year, month, day, hour, minute, second, dayOfWeek, monthName
Unit to extract from date.true

Example JSON Structure

{
"label" : "Extract Date Units",
"name" : "extractDateUnits",
"parameters" : {
"inputDate" : "2021-01-01T00:00:00",
"unit" : ""
},
"type" : "dateHelper/v1/extractDateUnits"
}

Output

Type: STRING

Get Current Date

Name: getCurrentDate

Get current date in the specified format.

Properties

NameLabelTypeDescriptionRequired
timeZoneTime ZoneSTRINGTime zone to use when formatting date.true
dateFormatDate FormatSTRING
Options EEE MMM dd yyyy HH:mm:ss, EEE MMM dd HH:mm:ss yyyy, MMMM dd yyyy HH:mm:ss, MMMM dd yyyy, MMM dd yyyy, yyyy-MM-dd’T’HH:mm:ss, yyyy-MM-dd HH:mm:ss, yyyy-MM-dd, MM-dd-yyyy, MM/dd/yyyy, MM/dd/yy, dd-MM-yyyy, dd/MM/yyyy, dd/MM/yy, UnixTimestamp
Here’s what each part of the format (eg. YYYY) means: yyyy : Year (4 digits) yy : Year (2 digits) MMMM : Month (full name) MMM : Month (short name) MM : Month (2 digits) EEE : Day (short name) dd : Day (2 digits) HH : Hour (2 digits) mm : Minute (2 digits) ss : Second (2 digits).true

Example JSON Structure

{
"label" : "Get Current Date",
"name" : "getCurrentDate",
"parameters" : {
"timeZone" : "",
"dateFormat" : ""
},
"type" : "dateHelper/v1/getCurrentDate"
}

Output

Type: STRING

Subtract Time

Name: subtractTime

Subtract time from date

Properties

NameLabelTypeDescriptionRequired
inputDateDateDATE_TIMEtrue
dateFormatDate FormatSTRING
Options EEE MMM dd yyyy HH:mm:ss, EEE MMM dd HH:mm:ss yyyy, MMMM dd yyyy HH:mm:ss, MMMM dd yyyy, MMM dd yyyy, yyyy-MM-dd’T’HH:mm:ss, yyyy-MM-dd HH:mm:ss, yyyy-MM-dd, MM-dd-yyyy, MM/dd/yyyy, MM/dd/yy, dd-MM-yyyy, dd/MM/yyyy, dd/MM/yy, UnixTimestamp
Here’s what each part of the format (eg. YYYY) means: yyyy : Year (4 digits) yy : Year (2 digits) MMMM : Month (full name) MMM : Month (short name) MM : Month (2 digits) EEE : Day (short name) dd : Day (2 digits) HH : Hour (2 digits) mm : Minute (2 digits) ss : Second (2 digits).true
yearYearINTEGERYears to subtract.false
monthMonthINTEGERMonths to subtract.false
dayDayINTEGERDays to subtract.false
hourHourINTEGERHours to subtract.false
minuteMinuteINTEGERMinutes to subtract.false
secondSecondINTEGERSeconds to subtract.false

Example JSON Structure

{
"label" : "Subtract Time",
"name" : "subtractTime",
"parameters" : {
"inputDate" : "2021-01-01T00:00:00",
"dateFormat" : "",
"year" : 1,
"month" : 1,
"day" : 1,
"hour" : 1,
"minute" : 1,
"second" : 1
},
"type" : "dateHelper/v1/subtractTime"
}

Output

Type: DATE_TIME