The decodeDate (time_t Output) function

Converts a Netezza Performance Server-encoded Date value to time_t. The function treats encodedDate as if it is UTC. The resulting time_t represents the time 00:00:00 on the specified date.

argument encodedDate: a Date encoded in NZ Format.

Description

The function has the following syntax:
inline void decodeDate(int32 encodedDate, int32* result, bool* 
errorFlag = NULL)

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

result specifies the parameter in which to record the time_t date representation, forced to be a signed int32.

errorFlag is an optional argument. If not NULL, it is set to true if isValidEpochDate(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 isValidEpochDate(encodedDate) is false).