I am getting date as 00010101 in CCDA if we use $ZDATEH function it is giving value out of range error
Can anyone please help me which function i can use to handle this error.
Comments
Do you have any solution to handle this date 00010101?
It depends on your implementation. you can add some conditions like if the date is "00010101" then convert to "1840-12-31" and use that date into $ZDH ($ZDH("1840-12-31",3)) or skip the $ZDH conversion and set 0 directly.
What date 00010101 represent?!
To me looks like a wrong date......how do you want to handle it??
The default 'mindate' value for the $ZDATE(hdate,dformat,monthlist,yearopt,startwin,endwin,mindate,maxdate,erropt,localeopt)
system function call is 0, which represents 1840-12-31. However, you can supply your own 'mindate' argument with negative values down -672045 which does date conversions more distantly into the past.
USER>zwrite $zdate(-672045,3,,,,,-672045)
"0001-01-01"
which is Gregorian date January 1st in the year 0001 CE. (That is the first day, in the first month in the first year of the first century.) I should note that the Gregorian calendar was not in use back in the year 0001 CE but I don't think IRIS has support for Julius Caesar's calendar. Passing a 'mindate' argument value more negative than -672045 will get you an <ILLEGAL VALUE> signal from $ZDATE() because there is some debate about whether the previous year is 0000 CE, -0001 CE or +0001 BCE.