portableSql

AddDaysToDateTime Portable SQL Function

Syntax

AddDaysToDateTime as T (DateTime as T, NrOfDays as N)

Arguments

DateTimeTime

A field or value.

NrOfDaysNumeric

Number of days to add.

Returns

resultTime

Returns a date NrOfDays ahead of DateTime.

Description

Get the date and time value NrOfDays days ahead of DateTime.

Discussion

The AddDaysToDateTime function computes a new date by adding days to a datetime field.

AddDaysToDateTime() function executed on the Northwind Access database
SELECT FIRST 1 CurrentDateTime() AS Now, AddDaysToDateTime(CurrentDateTime(), 14) AS Expr1 FROM Orders
=10/10/2019 12:48:35 00 pm|10/24/2019 12:48:35 00 pm