Static public member functions documentation

static int32_t epochEnd()
Gets the encoded epoch end.
Returns
The encoded epoch end.
static int32_t epochStart()
Gets the encoded epoch start.
Returns
The encoded epoch start.
static uint32_t getYearDay(uint32_t month, uint32_t day, uint32_t year, bool *errorFlag=NULL)
Given a m/d/y format date, returns the day number of the year.
Parameters
month
The month number, 1 to 12 inclusive.
year
The year of the date, SQL_YEAR_MIN to SQL_YEAR_MAX inclusive.
day
The day of month, 1 to 31 inclusive.
errorFlag
Optional. If not NULL, set to TRUE if isValidDate(month,day,year) is FALSE. set to FALSE otherwise.
Returns
Day value [0,364] for non-leap years and [0,365] for leap years, 0 if isValidDate(month,day,year) is FALSE and errorFlag is not NULL.
Exceptions
NzaeException
static bool isValidDate(uint32_t month, uint32_t day, uint32_t year)
Specifies whether a decoded m/d/y Date value is valid and within the Netezza
Parameters
month
The month number, 1 to 12 inclusive.
year
The year of the date, SQL_YEAR_MIN to SQL_YEAR_MAX inclusive.
day
The day of month, 1 to 31 inclusive.
errorFlag
Optional. If not NULL, set to TRUE if isValidDate(month,day,year) is FALSE. set to FALSE otherwise.
Returns
FALSE if (month>12 or month<1) or (day<1 or day>31) or (year<SQL_YEAR_MIN or year>SQL_YEAR_MAX) or (month is in (4, 6, 9, 11) and day>30) or (isLeapYear(year) and month=2 and day>29) or (!isLeapYear(year) and month=2 and day>28). TRUE otherwise.
static int32_t max()

Gets the encoded max.

Returns
The encoded max.
static int32_t min()

Gets the encoded min.

Returns
The encoded min.
static uint8_t numDaysInMonth(uint32_t month, uint32_t year, bool *errorFlag=NULL)
Determine the total number of days in a given month.
Parameters
month
The month number, 1 to 12 inclusive.
year
The year number, 1 to 9999. Used to determine the correct number of days if month is February.
errorFlag
Optional. If not NULL, set to TRUE if isValidDate(month,day,year) is FALSE. set to FALSE otherwise.
Returns
30 if month is (4, 6, 9, 11), 31 if month is (1, 3, 5, 7, 8, 10, 12), 28 if month is 2 and isLeapYear(year), 29 if month is 2 and !isLeapYear(year), 0 if errorFlag is not NULL, and (isValidYearNumber(year) is FALSE or isValidMonthNumber(month) is FALSE)
Exceptions
NzaeException
static int16_t yearMax()
Gets the decoded year max.
Returns
The decoded year max.
static int16_t yearMin()
Gets the decoded year min.
Returns
The decoded year max.
Helpers that return information about the possible legal value ranges for decoded information.