DMY2DATE allows us to create a date from integer values (or defaults) representing the day of the month, month of the year, and the four-digit year. If an optional parameter (MonthValue or YearValue) is not specified, the corresponding value from the system date is used. The syntax is as follows:
DateVariable := DMY2DATE ( DayValue [, MonthValue] [, YearValue] )
The only way to have the function use work date values for month and year is to extract those values and then use them explicitly. An example is as follows:
DateVariable := DMY2DATE(22,DATE2MDY(WORKDATE,2),DATE2MDY(WORKDATE,3))
DWY2DATE operates similarly to DMY2DATE, allowing us to create a date from integer values representing the day of the week (from 1 to 7 representing Monday to Sunday), week of the year (from 1 to 53), followed by the four-digit...