12min

DateTime actions

After creating a process you will have the ability to use the drag and drop functionality to add on your canvas actions from the Platform actions section.

The DateTime folder contains actions that can be used while working with dates:

  1. Week Number - Returns the week number for the given date. The week number indicates where the week falls numerically within a year.
  2. Today - Displays a string that represent the current date.
  3. Is Weekend - Verify if it's weekend, by giving the date. Returns true or false.
  4. Is Working Day - Verify if it's working day, by giving the date.
  5. Weekday - Displays an integer that represents the day of the week, by giving the date.
  6. UTC Now - Displays the current UTC.
  7.  Get Day - Returns the day of the date which was input by the user.
  8. Get Month - Returns the month of the date which was input by the user.
  9. Date Addition - Returns the date after being modified by the user input.
  10. Get Hours - Returns the hours of the time interval which was input by the user.
  11. Get Minutes - Returns the minutes of the time interval which was input by the user.
  12. Get Year - Returns the year of the date which was input by the user.
  13. Date Difference - Returns the difference between the second and the first date.
  14. Time Difference - Returns the difference between the second time interval and the first time interval.

You can create your own custom actions by using these guides. The code used to create the Custom Actions above can be found here.

How to use DateTime actions

To use any of them inside your process you will need to configure it after adding it to the canvas.

1. Drag the Is Weekend action on the canvas.

2. Link the actions.

Document image

3. Create a variable of type Boolean by clicking Add variable.

4. Add a date to the Input Date section and the variable you just created as presented in the Is it weekend* section.

Document image