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 FunctionsCode-11234DescriptionGet the effective format value from the TimeFormat property of the currentlocale, which defaults to a value of 1. This is the default behavior if you do notspecify format.Express time in the form "hh:mm:ss" (24-hour clock).Express time in the form “hh:mm” (24-hour clock).Express time in the form “hh:mm:ss[AM/PM]” (12-hour clock).Express time in the form “hh:mm[AM/PM]” (12-hour clock).precisionThe function displays the seconds carried out to the number of decimal places specified inthe precision parameter. For example, if you enter a value of 3 as precision, $ZTIME displaysthe seconds carried out to three decimal places. If you enter a value of 9, $ZTIME displaysthe seconds carried out to nine decimal places. Supported values are as follows:Value-1nDescriptionGets the precision value from the TimePrecision property of the current locale,which defaults to a value of 0. This is the default behavior if you do not specifyprecision.A value that is greater than or equal to 0 results in the expression of time ton decimal places.erroptThis parameter suppresses error messages associated with invalid Htime values. Instead ofgenerating error messages, the function returns the value indicated byerropt.ExamplesTo return the current local time using the special variable $HOROLOG, you must use the$PIECE function to specify the second piece of $HOROLOG. The following returns thetime in the 24–hour clock format “13:55:11”:WRITE $ZTIME($PIECE($HOROLOG,",",2),1)378 <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!