Your Airkit journey starts here

ADD_TO_DATETIME

Discussion

This function is used for adding time duration values to a Datetime. For example if you wanted to create a Datetime two weeks in the future, you could do

ADD_TO_DATETIME(NOW(), 14, "days")

For a full list of supported strings see the Date Units Table.

Declaration

ADD_TO_DATETIME(datetime, number, unit_string) -> datetime

Parameters

datetime
object -Any valid datetime
number
number -How many units you want to add to the datetime
unit_string
string -The value of the units to add.

Return Values

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