Subtract from date
Subtract an amount of time from a date.
Command in the Date and time toolkit · id ooa.datetime/subtract · 4 inputs (2 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Value | DateTime | Yes | Start date. | |
| Amount | Number | Yes | Amount to subtract. Fractions are exact for milliseconds to weeks; months, years and business days take whole numbers. | |
| Unit | String | No | days | Unit of the amount; business_days skips Saturdays, Sundays and the holidays. |
| Holidays | List | No | Dates that are not working days, e.g. ["2026-12-25"]. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | DateTime | New date and time. |