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