If the current date is May 1, 2010, the following queries return 1 because May 1, 2010, falls on the first Saturday of the month:
SELECT TD_SYSFNLIB.DAYOCCURRENCE_OF_MONTH(CURRENT_DATE); SELECT TD_SYSFNLIB.DAYOCCURRENCE_OF_MONTH(DATE '2010-05-01');
If the current date is May 1, 2010, the following queries return 1 because May 1, 2010, falls on the first Saturday of the month:
SELECT TD_SYSFNLIB.DAYOCCURRENCE_OF_MONTH(CURRENT_DATE); SELECT TD_SYSFNLIB.DAYOCCURRENCE_OF_MONTH(DATE '2010-05-01');