Sets the hours of a date time or date time only. For example, if you want to wait until a certain hour tomorrow, you can force the hour.
Date
setHours(<parameter>)
Parameter | Type |
---|---|
date time | dateTime |
date time without considering time zone | dateTimeOnly |
hours | integer |
setHours(<dateTime>,<hours>)
Returns a datetime.
setHours(<dateTimeOnly>,<hours>)
Returns a datetime without considering time zone.
setHours(toDateTime('2023-12-12T01:11:00Z'), 4)
Returns 2023-12-12T04:11:00Z.
setHours(nowWithDelta(1, "days"), 20)
Returns tomorrow at 8:XY PM, XY being the minutes at the moment of the current time evaluation. If the evaluation happens at 2:45 AM, the returned time will be 8:45 PM.