The encodeDate (m/d/y Values) function
The encodeDate() function converts a m/d/y Date value to a Netezza Performance Server-encoded Date value.
Description
The function
has the following syntax:
inline void encodeDate(uint32 month, uint32 day, uint32 year, int32*
encodedDate, bool* errorFlag = NULL)
day specifies the day count from 1 to 31 inclusive.
month specifies the month number from 1 to 12 inclusive.
year specifies the year number from SQL_YEAR_MIN to SQL_YEAR_MAX inclusive.
encodedDate is the parameter in which to record the Date in Netezza Performance Server-encoded format.
errorFlag is an optional argument. If not NULL, it is set to true if isValidDate(month,day,year) is false. Otherwise, it is set to false.
Throws
The function throws an opaque exception object if encodedDate is NULL or (errorFlag is NULL and isValidDate(month, day, year) is false).