The decodeTimestamp (m/d/y h:m:s:m Output) function
Converts a Netezza Performance Server-encoded Timestamp value to m/d/y, h:m:s:micros.
Description
inline void decodeTimestamp(int64 encodedTimestamp, uint8* month,
uint8* day, uint16* year, uint8* hour, uint8* minute, uint8* second,
uint32* mcrs, bool* errorFlag = NULL)encodedTimestamp specifies a value that is encoded in Netezza Performance Server Timestamp format.
month specifies the parameter in which to record the month number (1 - 12 inclusive).
day specifies the parameter in which to record the day count (1 - 31 inclusive).
year specifies the parameter in which to record the year number (SQL_YEAR_MIN to SQL_YEAR_MAX inclusive).
hour specifies the parameter in which to record the hour (0 - 23 inclusive).
minute specifies the parameter in which to record the minute (0 - 59 inclusive).
second specifies the parameter in which to record the second (0 - 59 inclusive).
mcrs specifies the parameter in which to record the microsecond (0 - 999,999 inclusive).
errorFlag is an optional argument. If not NULL, it is set to true if isValidTimestamp(encodedTimestamp) is false. Otherwise, it is set to false.
Throws
The function throws an opaque exception object if any(month,day,year,hour,minute,second,mcrs) is NULL or (errorFlag is NULL and isValidTimestamp(encodedTimestamp) is false).