DATE2DMY allows us to extract the sections of a date (day of the month, month, and year) from a Date field. The syntax is as follows:
IntegerVariable := DATE2DMY ( DateField, ExtractionChoice )
IntegerVariable and DateField are just as their names imply. The ExtractionChoice parameter allows us to choose which value (day, month, or year) will be assigned to the IntegerVariable field. The following table provides the DATE2DMY extraction choices:
DATE2DMY extraction choice |
Integer value result |
1 |
2-digit day (1–31) |
2 |
2-digit month (1–12) |
3 |
4-digit year |