[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Date math



-----Original Message-----
From: Eric A. Eastman <erice@ONTKO.COM>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Date: Thursday, January 22, 1998 7:34 PM
Subject: Re: Date math


>Charlie,
>
>I can't quite tell what you are doing from from the message.  (Including
>code can really help your odds of getting a good answer.)

Here's the code:

begin-procedure Get-WO
begin-select

wonum  &wonum (1,1)
description  (,15) wrap 30 2 keep-top
pmnum   &wopmnum
wopriority  (,45)

  do get_freq

sysdate-targcompdate (,54) EDIT 9999

 PRINT #FACTOR  (,65) EDIT 999

  next-listing no-advance need=2

from workorder

where targcompdate < sysdate - #factor
and status not in ('CLOSE', 'CAN')

 order by targcompdate

end-select
end-procedure

begin-procedure get_freq
begin-select

TO_NUMBER(DAYFREQUENCY)  &FREQ1

 let #factor = ROUND((.6 * &freq1), 0)

 FROM PM

where pm.pmnum = &wopmnum

end-select
end-procedure