datetime.subHours
This function subtracts the given number of hours from the DateTime.
Syntax
datetime.subHours(datetime, hours)
Arguments
Argument |
Type |
Description |
---|---|---|
datetime |
datetime |
Specify the date and time. |
hours |
int |
Hours to be subtracted. |
Returns
Type |
Description |
---|---|
datetime |
Date and time after subtracting the specified number of hours. |
Examples
The function datetime.subHours(datetime.current(),1)
returns the date and time of 1 hour ago.