11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

oth of the above lines generate a error, because 10/12/1947and 10/1/2010 fall outside of the date range.NotesInvalid Values with $ZDATEYou receive a error in the following conditions:• If you specify an invalid dformat code (an integer value less than -1 or greater than 12,a zero, or a non-integer value).• If you do not specify a startwin value when yearopt is 3 or 5.You receive an error under the following conditions:• If you specify an invalid value for hdate and do not either supply an erropt value or set$ZUTIL(68,32) or $ZUTIL(69,32).• If the given month number is greater than the number of month values in monthlist.• If maxdate is less than mindate.• If endwin is less than startwin.• If startwin and endwin specify a sliding temporal window whose duration is greater than100 years.You receive a error under the following conditions:• If you specify an hdate value that is out of the range of valid dates. For standard <strong>Caché</strong>this is 0 through 298013. For ISM-compatible <strong>Caché</strong> this is 1 through 94232. See$ZUTIL(68,32) Set Date Range and Invalid Date Behavior.• If you specify an otherwise valid date which is outside the range defined by the valuesassumed for maxdate and mindate and do not supply an erropt value.Error Handling with erropt$ZDATE<strong>Caché</strong> performs standard numeric evaluation on hdate, which must evaluate to a positiveinteger; thus, 7, "7", +7, 0007, 7.0, "7 dwarves", and --7 all evaluate to the same date value:01/07/1841. By default, values greater than 2980013 or less than 0 generate a error; fractional values generate an error. Non-numericstrings (including the null string) return the initial date: 12/31/1840.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!