Adds units of time to a date.
[datepart - quicky]
yyyy: Year; q: Quarter; m: Month; y: Day of year; d: Day
w: Weekday; ww: Week; h: Hour; n: Minute; s: Second;
l: Millisecond
Lucee Function Reference
Function DATEADD
Example
dateadd(string datepart,number number,datetime date):datetime
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
datepart | string | Yes |
one of the following: |
number | number | Yes | 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 | Yes | a datetime object |