The decodeDate (m/d/y Output) function

Converts a Netezza Performance Server-encoded Date value to m/d/y.

Description

The function has the following syntax:
inline void decodeDate(int32 encodedDate, uint8* month, uint8* day, 
uint16* year, bool* errorFlag = NULL)

encodedDate specifies a value that is encoded in Netezza Performance Server Date format.

day specifies the parameter in which to record the day count (1 - 31 inclusive).

month specifies the parameter in which to record the month number (1 - 12 inclusive).

year specifies the parameter in which to record the year number (SQL_YEAR_MIN to SQL_YEAR_MAX inclusive).

errorFlag is an optional argument. If not NULL, it is set to true if isValidDate(encodedDate) is false. Otherwise, it is set to false.

Throws

The function throws an opaque exception object if any(month,day,year) is NULL or (errorFlag is NULL and isValidDate(encodedDate) is false).