datetime.add()

Adds units of time to a date.

datetime.add( datepart, number, date )

Returns: DateTime

Argument Description
datepart
string, required

one of the following:

  • yyyy: Year
  • q: Quarter
  • m: Month
  • y: Day of year
  • d: Day
  • w: Weekday
  • ww: Week
  • h: Hour
  • n: Minute
  • s: Second
  • l: Millisecond
number
number, required

Number of units of datepart to add to date (positive, to get dates in the future; negative, to get dates in the past). Number must be an integer.

date
datetime, required

a datetime object

Examples

There are currently no examples for this function

See also