UPDATE_DATE
The function UPDATE_DATE replaces the date described by a DateTime with another specified Date.
This function takes two pieces of input: a base DateTime, and a Date. It outputs a DateTime: the base DateTime but with the date replaced by the information given by the input Date.
Declaration
Parameters
base_datetime (type: DateTime)
Any DateTime.
new_date (type: Date)
Any Date. This is what will replace the date information in the given DateTime.
Return Values
new_datetime (type: DateTime)
The DateTime that results from taking the base DateTime and replacing the date with the one given by new_date.
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 a time on April 1st 2020, and replaces the date with the information given by example_date, which describes the date January 2nd, 2022. Note that the resulting DateTime describes the same time, in the same timezone, as did example_date_and_time. Only the date has changed:
Last updated