Table of contents Previous: DATALOC Next: DEFLOOP

DATELIST

Lists the specified date in several formats.


Format

DATELIST date offset FORM=


Parameters

date

date to list; valid formats are YYYYDDD, YYYY/MM/DD and DD/MON/YYYY where YYYY, DDD, MM and DD are integers and MON is three or more letters, for example, JAN or JANUARY (default=current)

offset

number of days to offset the date; a positive integer increments the specified date, while a negative integer decrements the date (default=0)


Keyword

FORm=

'text'

customize output format using text and/or predefined place holders; see the Remarks for a list of place holders default= '(YYYY)(DDD) = (DD) (SMON) (YYYY) = (YYYY)/(MM)/(DD)'


Remarks

The minimum date that can be listed is 1 January 1970. The maximum date is system dependent.

The FORM keyword lets you customize the output format. You can mix regular text with the predefined place holders listed below.

Place Holder Description Example
(DOW) day of week Thursday
(SDOW) 3-character day of week Thu
(DD) 2-digit day of month 31
(DDD) 3-digit Julian day 365
(MM) 2-digit month of year 12
(MON) full month name December
(SMON) 3-character month name Dec
(YY) 2-digit year 98
(YYYY) 4-digit year 1998

Examples

DATELIST

This entry lists the current day in the formats YYYYDDD, DD MON YYYY and YYYY/MM/DD.

DATELIST X 1

This entry lists tomorrow's date in the formats YYYYDDD, DD MON YYYY and YYYY/MM/DD.

DATELIST 97264

This entry lists day 264 of 1997 in the formats shown below.

1997264 = 21 Sep 1997 = 1997/09/21

DATELIST 2012/05/23

This entry lists 23 May 2012 in the formats shown below.

2012144 = 23 May 2012 = 2012/05/23

DATELIST 1/MAR/2004 -1

This entry lists the day before 1 March 2004 in the formats shown below.

2004060 = 29 Feb 2004 = 2004/02/29

DATELIST 1998365 FORM='The date is: (DOW) (SDOW) (DD) (DDD) (MM) (MON) (SMON) (YY) (YYYY)'

This entry lists 31 December 1998 in the formats shown below.

The date is: Thursday Thu 31 365 12 December Dec 98 1998


Table of contents Previous: DATALOC Next: DEFLOOP