Skip to main content

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​

InputTypeRequiredDefaultWhat it is
ValueDateTimeYesStart date.
AmountNumberYesAmount to subtract. Fractions are exact for milliseconds to weeks; months, years and business days take whole numbers.
UnitStringNodaysUnit of the amount; business_days skips Saturdays, Sundays and the holidays.
HolidaysListNoDates that are not working days, e.g. ["2026-12-25"].

Outputs​

OutputTypeWhat it is
resultDateTimeNew date and time.