Date

Description:              This function returns a text string giving the date that corresponds to the number of days since January 1, 1970.

Returns:                    Text

Usage:                       Script or Steady State.

Format:                      Date(Day, DateForm [, Flags])

Parameters:             Day     { numeric }  { required }  { no default }

                                                Any numeric expression giving the number of days since January 1, 1970. This is a "Julian" style date.

                                    DateForm   { numeric  or text}  { required }  { no default }
          Any numeric or text expression selecting the format for the date format. If DateForm is numeric, the format for the date will be interpreted according to the standard VTS Date Formats.

 

                             If DateForm is a text value, it is interpreted as a date formatting string.  Please refer to the VTS Date Formatting Codes in the appendix. Note that these key stings are case sensitive.

Note: In the event that the DateForm parameter does not resolve to either a numeric or text value, the system-configured date format, as specified through the Windows Control Panel, is used. In this case, the Flags parameter is used to select from a number of options for the date.

                                    Flags     { numeric }  { required }  { no default }
          An optional parameter that is only used in the event that the DateForm parameter does not resolve to a numeric or a text value. The Flags parameter may be set as follows to adjust the format of the date.

Flags

Description

1

Generate the configured short form of the date (e.g. "29/03/04").

2

Generate the configured long form of the date (e.g. "29 March 2004").

8

Generate the configured year/month format (e.g. March 2004). Please note that this option is only available on Windows 2000/XP

Comments:               This function is primarily used to convert dates from historical data files to a format that is more easily readable. The Julian style date is used since it gives an easy method of calculating the time between dates and it is compact for historical records.

Example:

ZText(10, 590, Date(Today(), 4), 15, 0);

This displays today's date in the lower left of the screen.

See Also:

DateNum | Day | Month | Now | Time | Today | Year