![]() |
|
The dtextend() function extends a datetime value to a different qualifier. Extending is the operation of adding or dropping fields of a DATETIME value to make it match a given qualifier.
The dtextend() function copies the qualifier-field digits of the in_dt datetime variable to the out_dt datetime variable. The qualifier of the out_dt variable controls the copy.
The function discards any fields in in_dt that the out_dt variable does not include. The function fills in any fields in out_dt that are not present in in_dt, as follows:
In the following example, a variable fiscal_start is set up with the first day of a fiscal year that begins on June 1. The dtextend() function generates the current year.