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$ZDATETIMEH(datetime) converts a date and time value in the format "MM/DD/[YY]YYhh:mm:ss[.ffff]” to $HOROLOG format.SyntaxMMDD[YY]YYhhmmssffffMeaningA two-digit month.A two-digit day.Two or four digits for years from 1900 to 1999. Four digits for years before1900 or after 1999.The hour in a 24-hour clock format.Minutes.Seconds.Fractional seconds (zero to nine digits).$ZDATETIMEH(datetime,dformat,tformat,monthlist,yearopt,startwin,endwin,mindate,maxdate,erropt)converts a date and time value that was originally specified (through $ZDATETIME) indate and time to $HOROLOG or $ZTIMESTAMP format. The dformat, tformat, yearopt,startwin and endwin values are identical to the values used by $ZDATETIME.However, when you use a dformat of 5, 6, 7, 8, or 9, $ZDATETIMEH recognizes and convertsa date in any of the external date formats corresponding to dformat codes 1, 2, 3, 5, 6, 7, 8,or 9, as well as a special relative date format that begins with T or t, optionally followed bya plus (+) or a minus (-), and the number of days after or before the current date.$ZDATETIMEH recognizes and converts a time in any of eight time formats, regardless ofwhich time format you specify in the function call. In addition, $ZDATETIMEH recognizesthe suffixes “AM, PM, NOON, and MIDNIGHT.” You can express these suffixes in uppercase,lowercase, or mixed case. You can also abbreviate these suffixes to any number of letters.The recognized forms include:• The default date format, MM/DD/[YY]YY• The format DDMmm[YY]YY• The ODBC format YYYY-MM-DD• The format DD/MM/[YY]YY• The format Mmm D, YYYY• The format Mmm D YYYY356 <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!