The isValidDate() function
Verifies whether a decoded m/d/y Date value is valid and within the Netezza Performance Server Date range.
Description
The function
has the following syntax:
inline bool isValidDate(uint32 month, uint32 day, uint32 year)month specifies the month in the range of 1 (January) to 12 (December).
day specifies the day of the month in the range of 1 to 31 inclusive.
year specifies the year, which must be in the range of SQL_YEAR_MIN to SQL_YEAR_MAX, inclusive.
Returns
False if (month<1 or month>12), or (day<1 or day>31), or (year<SQL_YEAR_MIN or year > SQL_YEAR_MAX). Also, false if (month is in (4, 6, 9, 11) and day>30), or (isLeapYear(year) and month=2 and day>29), or (!isLeapYear(year) and month=2 and day>28).
Otherwise, the function returns true.