Description
Returns the current date in internal format.
Syntax
date = Date()
Remarks
The internal system date is the number of days since 31 December 1967. This date has been designated internally as day 0 (zero), so all dates after that are represented as the number of days that have elapsed since that specific date. All dates prior to day 0 (zero) are designated as the negative numbers. Consider the following dates as examples.
Date | Internal Representation |
---|---|
1 December 1967 | -30 |
5 January 1968 | 5 |
1 July 1979 | 4200 |
1 January 2000 | 11689 |
Note: The date that is returned is the local workstation date.
Caution: There are two internal dates that should be taken into consideration, day 10,000 and 10,100. The internal date reaches day 10,000 on May 18, 1995, and day 10,100 on August 26, 1995. Day 10,000 can affect systems through justification errors. Day 10,100 can affect systems through implied formatting errors. These dates may also be problematic if a program assumes the internal date is always 4 characters in length.
Day 10,000 Sorting Issues: In order to ensure proper sorting of dates, all numeric fields should have right justification (numeric sorting). Left justified date fields will result in incorrect sorts. In addition, indexes should not be set to left justification on any date field.
Day 10,100 Formatting Issues: Applications which take advantage of the implicit date formatting feature (which allows data entry without separators) will be affected when the internal date is also a valid external date, which first occurs on August 26, 1995.
Additional information about these issues is available through Revelation Technologies technical support.
See also
To convert an internal system date to its month, day, and year value, refer to OConv and TimeDate(). Also, Fmt().
Remarks
/* Assigns the internal system value of the current date to the variable TODAY. */ TODAY = Date() /* Assigns to WEEK_AGO the current date (internal format) minus 7 days. */ WEEK_AGO = Date() -7 * To display today's date. Call Msg(@Window, "Today is ":Fmt(date(),"D"))