Rexx - DATE


Advertisements

This method returns the local date in the following format.

dd mon yyyy

Syntax

DATE(options)

Parameters

Options − This is the option for formatting the date value. They can be anyone of the following options given. −

  • Base − This parameter returns the number of complete days since the day 1 January 0001

  • Days − This parameter returns the number of days that have passed for the current year

  • European − This parameter returns the date in the format dd/mm/yy

  • Full − This parameter returns the number of microseconds since the day 1 January 0001

  • Month − This parameter returns the full English name of the current month. An example can be, September

  • Normal − This parameter returns the date in the normal format as shown below. This is the default parameter option which is dd mon yyyy

  • Ordered − This parameter returns the date in the format – yy/mm/dd

  • Standard − This parameter returns the date in the format – yyyymmdd

  • Weekday − This parameter returns the English name for the day of the week. An example can be, Wednesday

Return Value

Returns, by default, the local date in the format: dd mon yyyy.

Example

/* Main program */ 
say DATE() 
say DATE("B") 
say DATE("D") 
say DATE("E")

When we run the above program we will get the following result. This depends on the current date on the system.

The following program is just an example.

Output

2 Jun 2016 
736116 
154 
02/06/16 
rexx_built_in_functions.htm
Advertisements