Week of year

Week of year

Post by Northern Hydraulics, Inc » Wed, 24 Dec 1997 04:00:00



Has anyone come up with a way to use RPG ILE to caclulate the week of
the year?  We're currently using RTVDAT in TAATOOLS, but I'd prefer to
use something without all the overhead that calling RTVDAT creates.

Thanks!
--

Tim Unsworth
Northern Hydraulics, Inc.
Where the Pros and Handymen Shop
http://www.northern-online.com

 
 
 

Week of year

Post by Ed Schechte » Thu, 25 Dec 1997 04:00:00


i wrote a procedure to do it.  don't have it and hand, but main logic went
like:

        myDate      extct:*y                  Year
                             eval                        strFirstDay = year
+ '-01-01'
            *iso            move   strFirstDay  FirstDay
            myDate      subdur FirstDay:d   DayOfYear
                             eval      WeekOfYear = DayOfWeek / 7

hope that helps.



Quote:> Has anyone come up with a way to use RPG ILE to caclulate the week of
> the year?  We're currently using RTVDAT in TAATOOLS, but I'd prefer to
> use something without all the overhead that calling RTVDAT creates.

> Thanks!
> --

> Tim Unsworth
> Northern Hydraulics, Inc.
> Where the Pros and Handymen Shop
> http://www.northern-online.com