The isValidTimeStruct() function

Verifies whether a tm structure can be encoded to a Netezza Performance Server Date or Timestamp value.

Description

The function has the following syntax:
inline bool isValidTimeStruct(const struct tm& ts)
ts specifies the tm structure to verify.

Returns

False if any ts.(tm_mon, tm_mday, tm_hour, tm_min, tm_sec) is negative or ts.tm_year+1900<SQL_YEAR_MIN or isValidDate(ts.tm_mon+1, ts.tm_day, ts.tm_year+1900) is false or isValidTime(ts.tm_hour, ts.tm_min, ts.tm_sec) is false.

Otherwise, the function returns true.

Throws

The function throws an opaque exception object if &ts is NULL.