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.

DescriptionSets the date internally stored by <strong>Caché</strong> in the $HOROLOG special variable to a specifiedfixed value for the current process. Calling $ZUTIL(71,0) restores $HOROLOG to thecurrent date.Using this function to set a fixed value for the date causes all subsequent calls to $HOROLOGfrom that process to return that fixed value as the date. A date set using $ZUTIL(71,date)is a fixed date; it does not increment at midnight. $ZUTIL(71,date) has no effect on the timeportion of $HOROLOG, which continues to represent the current time.Issue $ZUTIL(71) with no date parameter to display the date value set by a prior$ZUTIL(71,date) call. $ZUTIL(71) defaults to 0 (which denotes December 31, 1840.)Issuing $ZUTIL(71) with no date parameter has no effect on $HOROLOG.To restore $HOROLOG to the current date, issue $ZUTIL(71,0) or $ZUTIL(71,""). Thesecalls revert $HOROLOG to the current date, and revert $ZUTIL(71) to 0 (December 31,1840.)$ZUTIL(71,date) returns as its function value the previous setting of date. It returns zero if$HOROLOG was not set to a fixed value, either because you have not called this functionsince your <strong>Caché</strong> process was created, or you have already reset $HOROLOG by calling$ZUTIL(71,0).ParametersdateAn integer that falls between 0 (December 31, 1840) and 2980013 (December 31, 9999)inclusive.Example$ZUTIL(71)The following example shows the relationship between $ZUTIL(71) and $HOROLOG.This example uses the $ZDATETIME function to show that $ZUTIL(71) has no effect onthe time portion of $HOROLOG, and that $ZUTIL(71) does not return a time value. Dateformat 5 is used here because it always returns a 4–digit year:<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 681

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

Saved successfully!

Ooh no, something went wrong!