Date (command): Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Imported DATE command page from old wiki)
 
(polished up the description)
Line 1: Line 1:
See also [[Date (disambiguation)]]
See also [[Date (disambiguation)]]


The '''Date''' [[command]] sets the system date, which is accessed to record when files are saved and determines the value of the string function DATE$.
The '''Date''' [[command]] sets the session date, which determines the value of the string function DATE$. This has no effect on the underlying system date, and this setting is lost when BR is exited.  


==Comments and Examples==
==Comments and Examples==


The following example identifies the month as 10 (October), the day as 16, and the year as 1989:
The following example sets the month to 10 (October), the day to 16, and the year to 1989:


   DATE 10-16-89
   DATE 10-16-89


The next example will return a string similar to:  ''Thursday, August 14, 2008''
The next example will return a string similar to:  ''Monday, October 16, 1989''


   Date$("Day, Month D, CCYY")
   Date$("Day, Month D, CCYY")
Line 23: Line 23:
==Parameters==
==Parameters==


Date's two parameters allow you to separate the elements of the date by slashes ("mm/dd/yy") or by dashes ("mm-dd-yy").
Date's two parameter formats allow you to separate the elements of the date by slashes ("mm/dd/yy") or by dashes ("mm-dd-yy").


==Technical Considerations==
==Technical Considerations==


Changes to the date apply only to a single workstation -
Changes to the date apply only to a single workstation -
current session only.
current session only. Note that date is set as month, day and year, while it is reported by the date command as year, month and day. This is a legacy characteristic that has not been changed because normally the DATE ''function'' is used by programs instead of the DATE ''command''.


<noinclude>
<noinclude>

Revision as of 04:46, 28 December 2011

See also Date (disambiguation)

The Date command sets the session date, which determines the value of the string function DATE$. This has no effect on the underlying system date, and this setting is lost when BR is exited.

Comments and Examples

The following example sets the month to 10 (October), the day to 16, and the year to 1989:

 DATE 10-16-89

The next example will return a string similar to: Monday, October 16, 1989

 Date$("Day, Month D, CCYY")

Syntax

Default

Return the date in yy/mm/dd format.

Parameters

Date's two parameter formats allow you to separate the elements of the date by slashes ("mm/dd/yy") or by dashes ("mm-dd-yy").

Technical Considerations

Changes to the date apply only to a single workstation - current session only. Note that date is set as month, day and year, while it is reported by the date command as year, month and day. This is a legacy characteristic that has not been changed because normally the DATE function is used by programs instead of the DATE command.