11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Math and Time FunctionsWhen tformat is set to 5 or 6, the hdatetime input value is assumed to be local time, and isdisplayed as local time. The offset from UTC is taken from the local timezone setting.When tformat is set to 7 or 8, the hdatetime input value is assumed to be local date and time.The time is changed to correspond to UTC time (calculated using the local timezone setting).The date returned may also be changed (if necessary) to correspond to this UTC time value.Thus the returned date may differ from the local date.Note:$ZDATETIME has no way to determine if an hdatetime input value is in UTC timeor local time. Therefore, do not use tformat values 5, 6, 7, or 8 with an hdatetimethat is already in UTC, such as a $ZTIMESTAMP value. If you use the output froma tformat 7 or 8 conversion in an operation that converts the time back to local timebe aware that the date may have been changed in the local-to-UTC conversion.precisionA numeric value that specifies the number of decimal places of precision in which you wantto express the time. That is, if you enter a value of 3 as precision, $ZDATETIME displaysthe seconds carried out to three decimal places. If you enter a value of 9 as precision,$ZDATETIME displays the seconds carried out to nine decimal places.Supported values are as follows:-1: Get the precision value from the TimePrecision property of the current locale, whichdefaults to a value of 0. This is the default behavior if you do not specify precision.A value of n that is greater than or equal to zero (0) results in the expression of time to ndecimal places.Precision is only applicable if the hdatetime format can include a fractional time value($ZTIMESTAMP format), and if the tformat option selected includes seconds. Trailingzeros are not suppressed. If the precision specified exceeds the precision available on yoursystem, the excess digits of precision are returned as trailing zeros.monthlistA string, or the name of a variable that contains a string of month names. The names inmonthlist replace the default month name values and month abbreviation values, overridingthe MonthName and MonthAbbr properties of the current locale. The most common use ofmonthlist is to specify full month names or month name abbreviations in languages otherthan the default language for your locale.monthlist is valid only if dformat is 2, 5, 6, 7, 9. If dformat is 1, 3, 4, 8, 10,11, or 12$ZDATETIME ignores monthlist.348 <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!