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.

The result of the Date function can be stored in an action result or a control on screen. 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).

The following functions are available:


Format Date

Function Returns: the date in the selected format.

▶  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

Look Like Store Result in: where to store the formatted date


Extract from Date Functions (9 functions)

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

▶  Year: returns the full year

▶  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)

▶  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)

▶  Hour: returns the hour in 12 hour format or 24 hour format

▶  Minute: returns the minutes

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

▶  Day of Year: returns the numerical day of the year

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

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


Other Date for Day

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

▶  Using this date: the original date

▶  Return This: find a day of the week after or before the original date

▶  Store Result in: where to store the resulting date


Add to Date Functions (5 functions)

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

▶  Add Years

▶  Add Months

▶  Add Days

▶  Add Hours

▶  Add Minutes


Date Difference

Function Returns: the difference between two dates

▶  Subtract This Date: the subtrahend of the subtraction.

▶  From This Date: the minuend of the subtraction.

▶  Calculate Difference In: the difference can be calculated in milliseconds, seconds, minutes, hours, days and 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.

▶  Store Result in: where to store the difference.


Convert to UTC

Function Returns: the date in UTC

Convert this date: the date to convert

Store Result in: where to store the resulting date

Did this answer your question?