Date function

Yohn

Member
Hy!
I have to find all costumers who buy something in period of 1 week. I created program who finds costumers who buy something in period of 1 month next coming month.
I define variable iMonth as integer, and i do next:

iMonth = MONTH(TODAY) + 1.
IF iMonth0 = 13 THEN iMonth = 1.

now I have date in ma database and I need to find that customer by that function.
thx.
 
Something like this ought to answer your question:

Code:
define variable startDate as date no-undo.
define variable endDate   as date no-undo.

update startDate endDate.

for each order no-lock where
    order.purchaseDate >= startDate and
    order.purchaseDate <= endDate:

  display order.

end.
 
Back
Top