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.

Math and Time FunctionsNotesInvalid Values with $ZDATETIMEYou 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 specify a invalid value for tformat (an integer value less than -1 or greater than 8,a zero, or a non-integer value)• If you do not specify a startwin value when yearopt is 3 or 5You receive a error under the following conditions:• If you specify an invalid value for a date or time and do not supply an erropt value• 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 yearsYou receive a error under the following conditions:• 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 valueError Handling with erroptWhen supplied, the erropt parameter only suppresses error messages generated due to invalidor out of range values of hdatetime. Errors generated due to invalid or out of range values ofother parameters will always generate error messages whether or not erropt has been supplied.For example, an error is always generated when $ZDATETIMEspecifies a sliding window where endwin is earlier than startwin. Similarly, an error is generated when maxdate is less than mindate.Date Delimiter$ZDATETIME will use the value of the DateSeparator property of the current locale as thedelimiter between months, days, and the year when dformat=1 or 4. The delimiter in the352 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!