Difference between revisions of "DATEADD"
From AgileApps Support Wiki
imported>Evelyn m |
Wikidevuser (talk | contribs) |
||
Line 4: | Line 4: | ||
DATEADD('<tt>[[dString]]</tt>', number[,DAY or MONTH or YEAR or HOUR or MINUTE]) | DATEADD('<tt>[[dString]]</tt>', number[,DAY or MONTH or YEAR or HOUR or MINUTE]) | ||
DATEADD('time field', number[,DAY or MONTH or YEAR or HOUR or MINUTE]) | |||
DATEADD('date field', number[,DAY or MONTH or YEAR or HOUR or MINUTE]) | |||
DATEADD('time and date field', number[,DAY or MONTH or YEAR or HOUR or MINUTE]) | |||
where <tt>number</tt> represents a day, month, year, hour, or minute. | where <tt>number</tt> represents a day, month, year, hour, or minute. |
Latest revision as of 05:32, 5 February 2024
The DATEADD function adds a number to an existing date, date/time, or time variable.
- Syntax
DATEADD('dString', number[,DAY or MONTH or YEAR or HOUR or MINUTE])
DATEADD('time field', number[,DAY or MONTH or YEAR or HOUR or MINUTE])
DATEADD('date field', number[,DAY or MONTH or YEAR or HOUR or MINUTE])
DATEADD('time and date field', number[,DAY or MONTH or YEAR or HOUR or MINUTE])
where number represents a day, month, year, hour, or minute.
If the first argument is of type time, only hour or minute are allowed as the last argument.
- Return
- Date in the format defined by Date Format
- Examples
DATEADD('11/24/1963', 6) = '11/30/1963 12:00 AM' DATEADD('01/24/1964 12:12 PM', 6, 'MONTH') = '07/24/1964 12;12 PM' DATEADD('02:12 PM', 40) = '02:52 PM'