Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Excerpt
hiddentrue

dateAdd(date, dateField, dateValue) Add or subtract time to/from a date.


Function: dateAdd()

Add or subtract time to/from a date.

...

dateAdd(date, dateField, dateValue)

ArgumentTypeDescription
dateDateThe original date/time
dateFieldDate FieldThe part of the date to be added subtracted (e.g. days or seconds)
dateValueDate ValueThe number of (e.g.) days or seconds to be added or subtracted (negative value). This must be a whole number. If it is not an integer it will be rounded down and any decimal places will be ignored.

Examples

dateAdd(now(),_MONTH, -3)

Returns a date and time value three months before the current date and time.

...