Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

User request for a 'date' variable, able to contain the current date in different formats.

Usage

message "%systemdate%[optional formatstring]"

...

Display the current date in the default format; the quotes are optional
message
"%systemdate%"
Output: 03102014

Display the current date as short month, followed by the day of the month
message %systemdate%,MMMd
Output: Mar10

Display date as short day name, short month name, day of month, four digit year
message
"%systemdate%,ddd, MMM d, yyyy"
Output: Mon, Mar 10, 2014

Display date as two digit day of month, four digit year
message
"%systemdate%,dd, yyyy"
Output: 10, 2014

Display date as two digit day of month/two digit month/two digit year
message
"%systemdate%,dd/MM/yy"
Output: 10/03/2014

Display date as two digit month, two digit day, two digit year
message
%systemdate%,MM/ddyy
Output: 03/2014

Display date with week day and month spelled out
message
"%systemdate%,'Today is 'dddd', 'MMMM d', of the year' yyyy"
Output: Today is Monday, March 10, of the year 2014
message
"%SystemDate%, 'The current date is' ddd, MMM d, yyyy"
Output: The current date is Mon, Mar 10, 2014

...