Date and time functions

Date and Time helper functions used to convert to and from the Netezza date and time formats.

Functions

int64_t nzaeIntervalToMilliseconds(const NzudsInterval *nzInterval)
Converts an NZ Interval to milliseconds.
int64_t nzaeIntervalToSeconds(const NzudsInterval *nzInterval)
Converts an NZ Interval to seconds.
void nzaeMillisecondsToInterval(int64_t milliseconds, NzudsInterval *nzInterval)
Convert Milliseconds to an NZ Interval.
int64_t nzaeMillisecondsToNzTime(int32_t milliseconds)
Converts Time in milliseconds to an NZ Time.
int32_t nzaeMinutesToNzTimeTzOffset(int32_t minutes)
Convert Minutes to NZ TimeTz Offset.
int64_t nzaeNzDateToPosixTimeMilliseconds(int32_t nzDate)
Converts an NZ Date to an Epoch time in milliseconds.
int64_t nzaeNzDateToPosixTimeSeconds(int32_t nzDate)
Converts an NZ Date to an Epoch time in seconds.
int64_t nzaeNzTimestampToPosixTimeMilliseconds(int64_t nzTimestamp)
Converts an NZ Timestamp to Epoch time in milliseconds.
int64_t nzaeNzTimestampToPosixTimeSeconds(int64_t nzTimestamp)
Converts an NZ Timestamp to an Epoch time in seconds.
int32_t nzaeNzTimeToMilliseconds(int64_t nzTime)
Converts an NZ Time to time in milliseconds.
int32_t nzaeNzTimeToSeconds(int64_t nzTime)
Converts an NZ Time to time in seconds.
int32_t nzaeNzTimeTzOffsetToMinutes(int32_t nzTimeTzOffset)
Converts an NZ TimeTz Offset to minutes.
int32_t nzaePosixTimeMillisecondsToNzDate(int64_t posixTimeMilliseconds)
Converts an Epoch time in milliseconds to an NZ Date.
int64_t nzaePosixTimeMillisecondsToNzTimestamp(int64_t posixTimeMilliseconds)
Converts an Epoch time in milliseconds to an NZ Timestamp.
int32_t nzaePosixTimeSecondsToNzDate(int64_t posixTimeSeconds)
Converts an Epoch time in seconds to an NZ Date.
int64_t nzaePosixTimeSecondsToNzTimestamp(int64_t posixTimeSeconds)
Converts an Epoch time in seconds to an NZ Timestamp.
void nzaeSecondsToInterval(int64_t seconds, NzudsInterval *nzInterval)
Convert Seconds to an NZ Interval.
int64_t nzaeSecondsToNzTime(int32_t seconds)
Converts Time in seconds to an NZ Time.

Detailed description

Date and Time helper functions used to convert to and from the Netezza date and time formats.

Function documentation

int64_t nzaeIntervalToMilliseconds(const NzudsInterval *nzInterval)
Converts an NZ Interval to milliseconds.
Parameters:
  • NzudsInterval nzInterval

    The NZ-encoded interval.

    Returns

    Milliseconds.

int64_t nzaeIntervalToSeconds(const NzudsInterval *nzInterval)
Converts an NZ Interval to seconds.
Parameters:
  • NzudsInterval nzInterval

    The NZ-encoded interval.

    Returns

    Seconds.

void nzaeMillisecondsToInterval(int64_t milliseconds, NzudsInterval *nzInterval)
Convert Milliseconds to an NZ Interval.
Parameters:
  • milliseconds

    Milliseconds.

  • NzudsInterval nzInterval

    The NZ-encoded interval.

int64_t nzaeMillisecondsToNzTime(int32_t milliseconds)
Converts Time in milliseconds to an NZ Time.
Parameters:
  • milliseconds

    The time in milliseconds.

    Returns

    The NZ Time.

int32_t nzaeMinutesToNzTimeTzOffset(int32_t minutes)
Convert Minutes to NZ TimeTz Offset.
Parameters:
  • minutes

    Minutes.

    Returns

    The NZ Timezone offset.

int64_t nzaeNzDateToPosixTimeMilliseconds(int32_t nzDate)
Converts an NZ Date to an Epoch time in milliseconds.
Parameters:
  • nzDate

    NZ encoded date.

    Returns

    The Epoch time in milliseconds.

int64_t nzaeNzDateToPosixTimeSeconds(int32_t nzDate)
Converts an NZ Date to an Epoch time in seconds.
Parameters:
  • nzDate

    NZ encoded date.

    Returns

    The Epoch time in seconds.

int64_t nzaeNzTimestampToPosixTimeMilliseconds(int64_t nzTimestamp)
Converts an NZ Timestamp to Epoch time in milliseconds.
Parameters:
  • nzTimestamp

    NZ encoded timestamp

    Returns

    The Epoch time in milliseconds.

int64_t nzaeNzTimestampToPosixTimeSeconds(int64_t nzTimestamp)
Converts an NZ Timestamp to an Epoch time in seconds.
Parameters:
  • nzTimestamp

    NZ encoded timestamp.

    Returns

    The Epoch time in seconds.

int32_t nzaeNzTimeToMilliseconds(int64_t nzTime)
Converts an NZ Time to time in milliseconds.
Parameters:
  • nzTime

    NZ encoded time.

    Returns

    The time in milliseconds.

int32_t nzaeNzTimeToSeconds(int64_t nzTime)
Converts an NZ Time to time in seconds.
Parameters:
  • nzTime

    NZ encoded time.

    Returns

    The time in seconds.

int32_t nzaeNzTimeTzOffsetToMinutes(int32_t nzTimeTzOffset)
Converts an NZ TimeTz Offset to minutes.
Parameters:
  • nzTimeTzOffset

    The NZ Timezone offset.

    Returns

    Minutes.

int32_t nzaePosixTimeMillisecondsToNzDate(int64_t posixTimeMilliseconds)
Converts an Epoch time in milliseconds to an NZ Date.
Parameters:
  • posixTimeMilliseconds

    The Posix time in milliseconds.

    Returns

    An NZ date.

int64_t nzaePosixTimeMillisecondsToNzTimestamp(int64_t posixTimeMilliseconds)
Converts an Epoch time in milliseconds to an NZ Timestamp.
Parameters:
  • posixTimeMilliseconds

    The Posix time in milliseconds.

    Returns

    An NZ Timestamp.

int32_t nzaePosixTimeSecondsToNzDate(int64_t posixTimeSeconds)
Converts an Epoch time in seconds to an NZ Date.
Parameters:
  • posixTimeSeconds

    The Posix time in seconds.

    Returns

    The NZ Date.

int64_t nzaePosixTimeSecondsToNzTimestamp(int64_t posixTimeSeconds)
Converts an Epoch time in seconds to an NZ Timestamp.
Parameters:
  • posixTimeSeconds

    The Posix time in seconds.

    Returns

    The NZ Timestamp.

void nzaeSecondsToInterval(int64_t seconds, NzudsInterval *nzInterval)
Convert Seconds to an NZ Interval.
Parameters:
  • seconds

    Seconds

  • NzudsInterval nzInterval

    The interval output.

int64_t nzaeSecondsToNzTime(int32_t seconds)
Converts Time in seconds to an NZ Time.
Parameters:
  • seconds

    The time in seconds

    Returns

    The NZ Time.