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

NameLabelTypeControl TypeDescriptionRequired
inputDateDateDATE_TIMEDATE_TIMEtrue
dateFormatDate FormatSTRINGSELECTHere’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
yearYearINTEGERINTEGERYears to add.false
monthMonthINTEGERINTEGERMonths to add.false
dayDayINTEGERINTEGERDays to add.false
hourHourINTEGERINTEGERHours to add.false
minuteMinuteINTEGERINTEGERMinutes to add.false
secondSecondINTEGERINTEGERSeconds to add.false

Output

Type: STRING

Convert Date Timestamp

Name: convertUnixTimestampToIso8601

Converts UNIX timestamp to ISO8601 format.

Properties

NameLabelTypeControl TypeDescriptionRequired
dateTimestampUNIX TimestampNUMBERNUMBERUNIX Timestamp in seconds (10 digits) or milliseconds (13 digits)true
dateFormatDate FormatSTRINGSELECTFormatting that should be applied the text representation of date.true

Output

Type: STRING

Date Difference

Name: dateDifference

Get the difference between two dates.

Properties

NameLabelTypeControl TypeDescriptionRequired
startDateStart DateDATE_TIMEDATE_TIMEtrue
endDateEnd DateDATE_TIMEDATE_TIMEtrue
unitUnitSTRINGSELECTThe unit of difference between the two dates.true

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

NameLabelTypeControl TypeDescriptionRequired
inputDateDateDATE_TIMEDATE_TIMEtrue
unitUnit to ExtractSTRINGSELECTUnit to extract from date.true

Output

Type: STRING

Get Current Date

Name: getCurrentDate

Get current date in the specified format.

Properties

NameLabelTypeControl TypeDescriptionRequired
timeZoneTime ZoneSTRINGSELECTTime zone to use when formatting date.true
dateFormatDate FormatSTRINGSELECTHere’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

Output

Type: STRING

Subtract Time

Name: subtractTime

Subtract time from date

Properties

NameLabelTypeControl TypeDescriptionRequired
inputDateDateDATE_TIMEDATE_TIMEtrue
dateFormatDate FormatSTRINGSELECTHere’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
yearYearINTEGERINTEGERYears to subtract.false
monthMonthINTEGERINTEGERMonths to subtract.false
dayDayINTEGERINTEGERDays to subtract.false
hourHourINTEGERINTEGERHours to subtract.false
minuteMinuteINTEGERINTEGERMinutes to subtract.false
secondSecondINTEGERINTEGERSeconds to subtract.false

Output

Type: DATE_TIME