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 Functions$ZDATEHValidates and converts a date.$ZDATEH(date,dformat,monthlist,yearopt,startwin,endwin,mindate,maxdate,erropt)$ZDH(date,dformat,monthlist,yearopt,startwin,endwin,mindate,maxdate,erropt)ParametersdatedformatmonthlistyearoptstartwinendwinmindatemaxdateerroptAn expression that evaluates to a date string. $ZDATEH converts thisdate string to $HOROLOG format. This can be either an explicit date(specified in various formats) or the string “T” or “t”, representing thecurrent date.The “T” or “t” string can optionally include a signed integeroffset. For example “T-7” meaning seven days prior to the currentdate.Optional — Format option for the date, specified as an integer code.Optional — A string or the name of a variable that contains the monthnames you supplied.Optional — A code that specifies whether to represent years as twoorfour-digit valuesOptional — The start of the sliding window during which dates mustbe represented with two-digit years.Optional — The end of the sliding window during which dates arerepresented with two-digit years.Optional — The lower limit of the range of valid dates.Optional — The upper limit of the range of valid dates.Optional — This parameter suppresses error messages associatedwith invalid or out of range date values.DescriptionThe $ZDATEH function validates a specified date and converts it from any of the formatssupported by the $ZDATE function to $HOROLOG format. The exact action $ZDATEHperforms depends on the parameters you use.Simple $ZDATEH Format$ZDATEH(date) converts a date in the form MM/DD/[YY]YY to the first integer in the$HOROLOG format. (The $HOROLOG format consists of two integers: the first integer334 <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!