Progress
Language Reference


+ Date Addition Operator

Interfaces
OS
SpeedScript
All
All
Yes

Adds a number of days to a date, producing a date result.

SYNTAX

date + days 

date

An expression that evaluates to a DATE value.

days

An expression with a value of the number of days you want to add to a date.

EXAMPLE

This procedure finds all unshipped orders that are at least one week overdue. If the order is not shipped and the promised date is more than seven days ago, the procedure finds the record for the customer who placed the order and displays the order and customer data.

r-dadd.p
  DISPLAY "ORDERS SCHEDULED TO SHIP MORE THAN ONE WEEK LATE".
  FOR EACH order WHERE ship-date = ?:
    IF TODAY > (promise-date + 7)
    THEN DO:
      FIND customer OF order.
      DISPLAY order.order-num order.cust-num customer.name promise-date
      customer.terms.
    END.
  END. 

NOTE

The date addition operator rounds days to the nearest integer value.


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