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

Re: [sqr-users] RE: DATEADD function




s.due_date - 2 $anal_due"
won't work, but
s.due_date - 2         &anal_due"
should

clark 'the dragon' willis


PSA: Salary <> Slavery.  If you earn a salary, your employer is renting your 
services for 40 hours a week, not purchasing your soul.  Your time is the 
only real finite asset that you have, and once used it can never be 
recovered, so don't waste it by giving it away.

"Time is the coin of your life. It is the only coin you have, and only you 
can determine how it will be spent.  Be careful lest you let other people 
spend it for you."

Carl Sandburg
(1878 - 1967)



----Original Message Follows----


I received two responses for this but neither worked. One was to declare the
variable $anal_due as a date variable. The other was

"Why not just add to the SQL
s.due_date - 2 $anal_due"

Does anyone have any other suggestions?

Thanks again,

Sherri


 >  -----Original Message----->
 > Hello fellow SQR users,
 >
 > Here is a portion of some code that I'm using:
 >
 > select distinct
 > q.queue () on-break print=never level=1 before=bef-q after=aft-q
 > qtf.fraction &fraction
 > q.name &qname
 > s.due_date &duedate
 > pj.project_seq  () on-break print=never level=2 before=bef-wo 
after=aft-wo
 > pf.cust_id &customer
 > pf.reqnbr &profile
 > pf.cs_contact &csc
 > pac.acode () on-break print=never level=3 before=bef-acode 
after=aft-acode
 > ps.hsn &hsn
 > nvl(pac.charge,-1) &price
 > price.charge &listprice
 >   let $anal_due = dateadd(&duedate, 'day', -2)
 > from yada yada yada...
 >
 > I'm trying to calculate a date 2 days earlier than the s.due_date and 
this
 > is why I'm using the DATEADD function.
 >
 > In some cases this is working but in others it is not. The field
 > s.due_date is of the format 19-SEP-03 when it comes from the database.
 >
 > Can someone suggest a better way of doing this?
 >
 > Thanks much,
 >

_________________________________________________________________
Get a FREE computer virus scan online from McAfee. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users