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.

System and Other FunctionsNote:Because of a limitation in the Windows operating system, putting your Windowssystem into hibernate or standby mode may cause $ZUTIL(188) to return unpredictablevalues. Rebooting your Windows operating system will restore $ZUTIL(188)to the correct value. This problem does not affect $HOROLOG or $ZTIMESTAMPvalues.The various ways to return the current date and time are compared, as follows:• $ZUTIL(188) returns the local, variant-adjusted date and time, with fractional seconds,in <strong>Caché</strong> storage ($HOROLOG) format. Fractional seconds are expressed in the maximumavailable number of digits of precision.• $HOROLOG contains the local, variant-adjusted date and time in <strong>Caché</strong> storage format.It does not record fractional seconds. Instead, $HOROLOG rounds up any fractionalsecond to the next whole second.• $ZTIMESTAMP contains the UTC (Greenwich Mean) date and time, with fractionalseconds, in <strong>Caché</strong> storage ($HOROLOG) format. Fractional seconds are expressed inthree digits of precision.The $ZUTIL(188) value is unaffected by the $ZUTIL(71) function. ($ZUTIL(71) is usedto set the $HOROLOG value to a specified date.)You can use the $ZDATETIME function to convert dates and times from $HOROLOGformat to display format.ExampleSET x=$HOROLOGSET y=$ZUTIL(188)SET z=$ZTIMESTAMPWRITE !,x," which is ",$ZDATETIME(x,1,1,9)WRITE !,y," which is ",$ZDATETIME(y,1,1,9)WRITE !,z," which is ",$ZDATETIME(z,1,1,9)See Also• $ZDATETIME function• $ZUTIL(71) Set Date to a Fixed Value function• $HOROLOG special variable• $ZTIMESTAMP special variable• $ZTIMEZONE special variable•722 <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!