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

Re: Subtracting 90 days from a date



Hi Gilbert:

There is a handy procedure in the 'datemath.sqc' you could use to do
whatever you want with dates.
Let's say you want to subtract 90 days from the Effdt; you could procede
as follows:

begin-procedure Find-New-Date

   do convert-to-dtu-date(&C.Effdt,$dtu_Effdt)
   do dtu-subtract-days($dtu_Effdt,90,$dtu_New_Dt)
   do convert-From-DTU-Date($dtu_New_Dt, $dtu_Reference_Dt)

!$dtu_Reference_Dt is the calculated date. This is handy, because you
don't have to worry about change in  !years.

end-procedure


Hope this helps.
Aya.


Gilbert Yousefpour wrote:
>
> Hi everyone;
>
> I have three questions that I would greatly appreciate any answers on.
>
> 1.  How do I get the system date in SQR ?
> 2.  Is it possible to assinge the system date to a string Variable?
> 3.  How can i subtract 90 days from a date and come up with another date?
>
> I really appreciate any feed back.  If you have the answers to my questions
> would you please send it to gyousefp@firstdata.com as well as just simply
> replying to the email.  Thank you a million and a half :)
>
> Gilbert