Progress
Language Reference


TODAY Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns the current system date.

SYNTAX

TODAY 

EXAMPLE

This procedure prints the date in the first line at the top of each page of a report. Instead of using TODAY in the FORM statement, the procedure uses a variable to hold the date. This ensures that the same date appears on all pages of the report, even if this procedure runs through midnight.

r-today.p
DEFINE VARIABLE rptdate AS DATE.

OUTPUT TO PRINTER.

rptdate = TODAY.
FORM HEADER rptdate "Customer List" AT 34
      "Page" AT 66 PAGE-NUMBER FORMAT ">>>9" SKIP(2)
      WITH NO-BOX PAGE-TOP.
VIEW.
FOR EACH customer:
    DISPLAY name AT 1 address AT 31
      city + ", " + " " + state FORMAT "x(35)" at 31
      WITH NO-BOX NO-LABELS CENTERED.
END. 

PAGE-TOP frames are re-evaluated on every new page. Therefore, if you do not use a variable for the date, a different date is displayed on the following page(s) if the report starts before midnight and ends after midnight.

SEE ALSO

DATE Function, DAY Function, MONTH Function, TIME Function, WEEKDAY Function, YEAR Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095