Date Functions Action

This action contains multiple functions to manipulate and parse date and time.

Updated over a week ago

The Date functions action allows you to do "date math" - for example, determining how many days separate two given dates.

In each function, there are parameters to specify the source of the date. Since this can be stored in a variety of different places within Method, a dropdown is provided to locate where the date is stored. This can range from a date being manually put in, to dates being stored in action results or controls on screen.

Each date function asks where to store the result, and, unless otherwise specified, the returned date is formatted as 

M/D/YYYY H:MM:SS xM 

(e.g. 6/5/2017 9:00:00 am).

Since storing the function result is the same for every character function, it will not be explicitly called out.


Format Date

Function Result: the date in the selected format.

Parameter

Description

Using this date

The date to format

Format The Date to

Given a date of Feb 27, 2016, here are the following date format options available:

  • d: 2/27/2016

  • D: Friday, February 27, 2016

  • f: Friday, February 27, 2016 12:11 PM

  • F: Friday, February 27, 2016 12:12:22 PM

  • g: 2/27/2016 12:12 PM

  • G: 2/27/2016 12:12:22 PM

  • m: February 27

  • o: 2016-02-27T12:12:22.1020000-08:00

  • s: 2016-02-27T12:12:22

  • t: 12:12 PM

  • T: 12:12:22 PM

  • u: 2016-02-27 12:12:22Z

  • U: Friday, February 27, 2016 8:12:22 PM

  • Y: February, 2016


Extract from Date Functions (9 functions)

There are a 9 functions where you can return a specific date element of a given date.

  1. Year: returns the full year

  2. Month: returns the month using one of four formats:

    • Short (e.g.Jun)

    • Long (e.g. June)

    • MM (e.g. 06)

    • M (e.g. 6)

  3. Day: returns the day using one of four formats:

    • Short (e.g.Mon)

    • Long (e.g. Monday)

    • dd (e.g. 02)

    • d (e.g. 2)

  4. Hour: returns the hour in 12 hour format or 24 hour format

  5. Minute: returns the minutes

  6. Day of Week: returns the day of the week (e.g. Monday)

  7. Day of Year: returns the numerical day of the year

  8. First Day of Month: returns the first day of month (e.g. 4/1/1988 12:00:00 AM)

  9. Last Day of Month: returns the last day of month (e.g. 4/30/1988 12:00:00 AM)


Other Date for Day

Function Result: a date within a specified range of a given date

Description

Using this date

The original date.

Return This

Find a day of the week after or before the original date:

  • Before

  • After

  • On or Before

  • On or After


Add to Date Functions (5 functions)

There are 5 different functions where you can add a specific time to a given date. 

  1. Add Years

  2. Add Months

  3. Add Days

  4. Add Hours

  5. Add Minutes


Date Difference

Function Result: the difference between two dates.

Description

Subtract This Date

The JSON text to parse.

From This Date

The key to reference the value.

Calculate Difference In

Difference can be calculated in:

  • milliseconds

  • seconds

  • minutes

  • hours

  • days

  • ticks.

NOTE: A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond, or 10 million ticks in a second.


Convert to UTC

Function Returns: the date in UTC.

Description

Convert this date

The date to convert.

Did this answer your question?