The encodeTime() function

The encodeTime() function converts a h:m:s:micros Time value to a Netezza Performance Server-encoded Time value.

Description

The function has the following syntax:
inline void encodeTime(uint32 hour, uint32 minute, uint32 second, 
uint32 mcrs, int64* encodedTime, bool* errorFlag = NULL)

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.

encodedTime specifies the parameter in which to record the Time that is encoded in Netezza Performance Server format.

errorFlag is an optional argument. If not NULL, it is set to true if isValidTime(hour,minute,second,mcrs) is false. Otherwise, it is set to false.

Throws

The function throws an opaque exception object if encodedTime is NULL or (errorFlag is NULL and isValidTime(hour, minute, second, mcrs) is false).