Date (command): Difference between revisions
(Imported DATE command page from old wiki) |
(→Syntax) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
See also [[Date (disambiguation)]] | See also [[Date (disambiguation)]] | ||
The '''Date''' [[command]] sets the | 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 | 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: '' | The next example will return a string similar to: ''Monday, October 16, 1989'' | ||
Date$("Day, Month D, CCYY") | Date$("Day, Month D, CCYY") | ||
==Syntax== | ==Syntax== | ||
DATE {[mm-dd-yy]|[mm/dd/yy]} | |||
[[Image:DateCommand.png]] | [[Image:DateCommand.png]] | ||
Line 23: | Line 24: | ||
==Parameters== | ==Parameters== | ||
Date's two | 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> |
Latest revision as of 15:37, 6 May 2014
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
DATE {[mm-dd-yy]|[mm/dd/yy]}
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.