Skip to main content
Roberty Studio
RPADate and time

Remove Date

Remove Date

Decrements a date by subtracting an amount of time in a defined unit, returning the new resulting date. Ideal for calculating past dates, previous periods or retroactive time windows — such as "30 days ago" or "last month". It can take holidays into account in the calculation when it is linked to a Date and time settings action.


Options​

Use a date relative to the robot's execution?​

Defines whether the base date will be the current date at the moment of the execution. Select Yes to use the current date automatically, or No to provide a specific date.

Input format date​

Select the format of the base date provided: Traditional (31/12/2024), In full (31 de dezembro de 2024) or International (2024-12-31). This field is only shown when Use a date relative to the robot's execution? is set to No.

Date to be formatted​

Enter the base date from which the time will be subtracted. This field is only shown when Use a date relative to the robot's execution? is set to No.

Quantity​

Enter the amount of time that will be subtracted from the base date.

Time unit​

Select the unit of the amount provided: Day, Week, Month or Year.

Output date format​

Select the format in which the resulting date will be returned: Traditional (31/12/2024), In full (31 de dezembro de 2024) or International (2024-12-31).

Select the date settings​

Select a Date and time settings action so that holidays are taken into account in the calculation. This field is optional.

Output language​

Choose the language of the output date — Brazil Portuguese or English. For example, Brazil Portuguese produces an output such as 17 de abril de 2026.

Returns​

Javascript code​

js
actions["action-id"].value // resulting date after the time is subtracted (Text)

Field selection​

  • value — new date with the time subtracted, in the output format selected (Text)

Rules and Conditions​

  • The Quantity field is required.
  • When Use a date relative to the robot's execution? is No, the date provided must match the format selected in Input format date.
  • The Select the date settings field is optional — when provided, the days configured as holidays are skipped in the calculation.