Skip to main content

Adjust Date/Time

Command description

Add or subtract a period of time from the specified date and time. When the original date and time is empty, the current system date and time is used.

Command Input Parameters

input parametersInput parameter typeDescription
Original Date/Timedatetime or strOptional, the date and time or parsable date and time text as the basis for calculation, such as 2026-06-20 12:30:00, 2026/06/20; when empty, the current date and time is used
Adjustment MethodenumAdd, Subtract
Durationnumber or strAmount to add or subtract, expressed in the selected time unit
Time UnitenumSecond, Minute, Hour, Day, Month, Year
Text TypeboolWhen True, it outputs text, when it is False, it outputs a datetime object.

Command Output Parameters

Output parametersOutput parameter typeDescription
New Date/Timedatetime or strAdjusted date and time; text when text type is enabled

Supported date and time text formats

When datetime parameters use text, the following formats are supported:

FormatExample
yyyy-MM-dd HH:mm:ss2026-06-20 12:30:00
yyyy/MM/dd HH:mm:ss2026/06/20 12:30:00
yyyy-MM-dd HH:mm2026-06-20 12:30
yyyy/MM/dd HH:mm2026/06/20 12:30
yyyy-MM-dd2026-06-20
yyyy/MM/dd2026/06/20
ISO format2026-06-20T12:30:00, 2026-06-20T12:30:00.123456, 2026-06-20T12:30:00+08:00

For AI-generated workflows, prefer yyyy-MM-dd HH:mm:ss and avoid unsupported formats such as "June 20, 2026".

AI Workflow Generation Notes

  • The original date and time can be left blank. When left blank, None will be passed at runtime and the current time will be used.
  • The original date and time can be datetime or parsable date and time text, such as 2026-06-20 12:30:00, 2026/06/20; the time length must be a number or a numeric expression.
  • Time units in seconds, minutes, hours, and days support decimals; time units in months and years will be treated as integers.
  • When Text Type is True, the output is a string in yyyy-MM-dd HH:mm:ss format. For other formats, return a datetime and use Convert Date/Time to Text.