MoveDate

The MoveDate()function shifts a date by a given amount of a date unit.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a new date where a number of units is added/subtracted to/from a date.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Although MoveDate() IS SQL Compatible - meaning it will be used on the database to return a smaller resultset, it may be slow in execution on the database, depending on the situation (number of records, distribution over data-pages, the filter in total with maybe other fields) where SQL may not be able to optimize the execution plan...

Syntax

MoveDate(date, number, unit)

MoveDate('2016-05-02T05:37:44', -3, year) =>Result: Thursday, May 2, 2013 5:37:44 AM

MoveDate(UnknownDate, UnknownNumber, Unknownunit) =>Result: (unknowndate)

Parameters

Name
Type
Required
Description

date

date time

☑️

a date

number

numeric

☑️​​

the number or amount that a date the value is moved.

unit

Keyword

​​☑️

the [date unit] that is moved in date. Possible values: year, month, week, day, hour, minute or second.

Last updated