Your Airkit journey starts here

SUBTRACT_FROM_DATETIME

Subtract units from the a datetime object. Negative values will do the same as ADD_TO_DATETIME.

Declaration

SUBTRACT_FROM_DATETIME(datetime, number, unit_string) -> datetime

Parameters

datetime
object -Any valid datetime object
number
number -How many units you want to add to the datetime object
unit_string
string -The value of the units to add: years, months, weeks, days, hours, minutes, seconds, milliseconds.

Return Values

datetime
datetime -The resulting datetime object by adding the number of units to the input datetime.