portableSql
AddHoursToDateTime Portable SQL Function
Syntax
AddHoursToDateTime as T (DateTime as T, NrOfHours as N)
Arguments
- DateTimeTime
A field or value.
- NrOfHoursNumeric
The number of hours to add.
Returns
- resultTime
Returns the date and time value NrOfHours hours ahead of DateTime.
Description
Get the date and time value NrOfHours hours ahead of DateTime.
Discussion
The AddHoursToDateTime function computes the date and time value NrOfHours hours ahead of DateTime.
AddHoursToDateTime() function executed on the Northwind Access database
SELECT FIRST 1 Now() AS Now, AddHoursToDateTime(Now(), 6) AS Later FROM Orders =10/10/2019 12:45:57 00 pm|10/10/2019 06:45:57 00 pm