Railo 4.2 Reference
Choose a function:

Function DATEADD

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


dateadd(string datepart,number number,datetime date):datetime


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:
  • 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  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