UPDATE_TIME
The function UPDATE_TIME replaces the time described by a DateTime with another specified Time.
This function takes two pieces of input: a base DateTime, and a Time. It outputs a DateTime: the base DateTime but with the time replaced by the information given by the input Time.
Declaration
Parameters
base_datetime (type: DateTime)
Any DateTime.
new_time (type: Date) Any Time.
This is what will replace the time information in the given DateTime.
Return Values
new_datetime (type: DateTime)
The DateTime that results from taking the base DateTime and replacing the time with the one given by new_time.
Examples
Assume the example has access to the following DateTime and Date values:
The following example takes the DateTime example_date_and_time, which describes 4:14pm, 38 seconds and 0 milliseconds on a particular date, and replaces the time with the information given by example_time, which describes the time 5:11am, 55 seconds and 45 milliseconds. Note that the resulting DateTime describes the same date and the same timezone, as did example_date_and_time. Only the time has changed:
Last updated