Public member functions

NzaeTimestampField addInterval(const NzaeIntervalField &interval) const
Constructs a TimestampField by adding an interval.
NzaeIntervalField age(const NzaeTimestampField &x) const
Constructs an IntervalField by subtracting a timestamp.
void decodeTimestamp(uint8_t *month, uint8_t *day, uint16_t *year, uint8_t *hour, uint8_t *minute, uint8_t *second, uint32_t *mcrs, bool *errorFlag=NULL) const
Converts a Netezza-encoded Timestamp value to m/d/y, h:m:s:micros.
void decodeTimestamp(time_t *result, bool *errorFlag=NULL) const
Converts a Netezza-encoded Timestamp value to time_t. Drops the microseconds after the last whole minute of the timestamp value.
void decodeTimestamp(struct timeval *result, bool *errorFlag=NULL) const
Converts a Netezza-encoded Timestamp value to struct timeval.
void decodeTimestamp(struct tm *result, bool *errorFlag=NULL) const
Converts a Netezza-encoded Timestamp value to struct tm. Drops the microseconds after the last whole minute of the timestamp value.
void encodeTimestamp(uint32_t month, uint32_t day, uint32_t year, uint32_t hour, uint32_t minute, uint32_t second, uint32_t mcrs, bool *errorFlag=NULL)
Converts a m/d/y, h:m:s:micros Timestamp value to a Netezza-encoded Timestamp.
void encodeTimestamp(time_t ts, bool *errorFlag=NULL)
Converts a time_t value to a Netezza-encoded Timestamp. Encodes the value in UTC and applies no offsets. Adds 0 microseconds to the encoded value.
void encodeTimestamp(const struct timeval &ts, bool *errorFlag=NULL)
Converts a struct timeval value to a Netezza-encoded Timestamp.
void encodeTimestamp(const struct tm &ts, bool *errorFlag=NULL)
Converts a struct tm value to a Netezza-encoded Timestamp. Uses only the ts.tm_year, ts.tm_day, ts.tm_mon, ts.tm_hour, ts.tm_min and ts.tm_sec fields of ts, ignoring the remaining fields. The value specified for ts must pass isValidTimeStruct(). Adds 0 microseconds to the encoded value.
void fromString(std::string str)
Constructs a field from the string.
bool isValidEpochTimestamp() const
Determines whether a Netezza-encoded Timestamp value is valid and within the time_t Epoch range.
bool isValidTimestamp() const
Determines whether a Netezza-encoded Timestamp value is valid and within range.
NzaeTimestampField(const NzaeTimestampField &field)
Constructs a timestamp field with value field.
NzaeTimestampField(int64_t val)
Constructs a timestamp field with value val.
NzaeTimestampField(const NzaeDateField &field)
Constructs a timestamp field with value field.
NzaeTimestampField()
Constructs a NULL timestamp field.
void offsetTimestamp(int32_t sqlOffset, bool *errorFlag=NULL)
Applies an offset to an NZ Timestamp.
operator int64_t() const
Returns the encoded field value.
operator NzaeDateField() const
Returns the date field value.
operator NzaeTimeField() const
Returns the time field value.
operator NzaeTimeTzField() const
Returns the timetz field value.
NzaeTimestampField& operator=(const NzaeTimestampField &field)
Assigns the value of the argument to a field object.
NzaeTimestampField& operator=(const NzaeDateField &field)
Assigns the value of the argument to a field object.
NzaeTimestampField& operator=(NzaeField &field)
Assigns the value of the argument to a field object.
NzaeTimestampField& operator=(int64_t val)
Assigns the value of the argument to a field object.
NzaeTimestampField subInterval(const NzaeIntervalField &interval) const
Constructs a TimestampField by subtracting an interval.
NzaeIntervalField subTimestamp(const NzaeTimestampField &x) const
Constructs an IntervalField by subtracting a timestamp.
std::string toString() const
Returns the string representation of the field.
virtual NzaeDataTypes::Types type() const
Returns the type of the field.