Skip to main content


ObjectScript assigns each day an integer value, starting with 0 for 12/31/1840 up to 2980013 for 12/31/9999. Another example: 1/1/2002 is 58805. There are routines and functions for converting a date from a number of acceptable external formats to its (internal) integer format, and vice versa. Check the Caché documentation for the details. Similarly, ObjectScript counts each second since midnight each day, and provides routines and functions for conversion of time.

Related to the date functions is an ObjectScript system variable called $Horolog. System variables act like functions with no arguments. $Horolog returns the day number for today, followed by the count of seconds since midnight, separated by a comma. The date routines and functions, and $Horolog, provide an easy way for you to allow users to enter dates in a variety of formats, verify that the dates are valid, and perform date arithmetic.

FeedbackOpens in a new tab