The decodeDate (struct tm Output) function
Converts a Netezza Performance Server-encoded Date value to a struct tm. The resulting tm represents the time 00:00:00 on the specified date, with an unknown daylight savings status.
Description
inline void decodeDate(int32 encodedDate, struct tm* result, bool*
errorFlag = NULL)
encodedDate specifies a value that is encoded in Netezza Performance Server Date format.
result specifies the structure where the decoded Date is written, such that result->tm_year, result->tm_mon, result-> tm_mday, result->tm_yday and result->tm_wday contain the appropriate fields in tm format. result->tm_isdst is set to -1. When applicable, all the other fields of result are set to 0.
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 result is NULL or (errorFlag is NULL and isValidDate(encodedDate) is false).