Date
Last updated
Last updated
The Date library in Automate provides actions for handling operations related to historical dates. These actions empower users to convert date values to strings and make time-dependent adjustments on date values within their workflows.
The purpose of the Date library is to streamline the manipulation and conversion of date values, enabling users to perform various operations to meet their workflow needs.
The Date library consists of two main actions: Convert Date to String and Modify Date. These actions allow users to convert date values to strings and adjust historical dates based on specific criteria.
Convert Date to String:
Convert date values to string format.
Modify Date:
Make time-dependent adjustments on date values.
Description: The Convert Date to String action converts date values into string format using specified formats.
Usage:
Source Date:
Enter the date value to convert to a string.
This field accepts keyboard input or variable selection.
New Date Format:
Specify the format of the date.
Enter the desired format or choose a variable.
Assign the Output to Variable:
Select the string variable to assign the converted date value.
Description: The Modify Date action allows users to adjust historical date values based on specific criteria.
Usage:
Date:
Select the date value to be modified.
This field contains only date-type variables.
Add Modification:
Choose from three different modification rules:
Custom:
Adjust the date using an adjustment bar.
Select the time unit and adjust the bar accordingly.
Rules:
Maximum adjustment for "month" is "+- 12".
Maximum adjustment for "week" is "+-52".
Enter values on the right for addition and on the left for subtraction.
Find Next/Previous day of Week:
Return the date to the next or previous weekdays.
Select the option for next or previous.
Choose the day of the week.
Example:
Input: Wednesday 05.05.2021
Selected: Next Friday
Output: Friday 07.05.2021
Find Start/End day of Week/Month/Year:
Return the date to the first or last days of specified units.
Select the option for first or end day.
Choose the time unit (month, year, week, day).
Example:
Input: Wednesday 05.05.2021
Selected: First Day of the month
Output: Monday 01.05.2021
Description: The Convert Date to Timestamp action allows users to convert date values into timestamps, providing a way to represent dates as numeric values.
Purpose: Timestamps are widely used in computing to represent date and time information as a single numeric value, which is particularly useful for sorting, comparison, and calculations.
Usage:
Inputs:
Source Date (Required): Input the date value to be converted into a timestamp.
Source Date Format: Specify the format of the source date using one of the provided formats (e.g., DD-MM-YYYY, MM.DD.YYYY, YYYY/MM/DD).
Timestamp Format: Choose the desired timestamp format (e.g., Millisecond, Second).
Assign the output to variable (Required): Select a variable to store the generated timestamp.
Outputs:
Expected results: The action will generate a timestamp based on the provided date value and format, assigning it to the specified variable.