Jim, there's a function:
(IWOY(arg))

Where arg is a value that has a DATE data type, IWOY returns the number week of the year.

In the following example, the value of viwoy is 11.


SET VAR viwoy = (IWOY('03/15/2006'))  

Maybe subtract one year from the current date (or date to be compared), see what week number of the previous year it is and then adjust last year's date accordingly.

Doug
p.s. There are ADDDAY and ADDMON functions, but I don't know of an ADDWEEK.  Check R:Base help (F1), Function Index, Function Categories for all the current functions.


Jim Belisle wrote:

I want to compare weekly totals one year apart.

But I want to make sure the comparison is 52 weeks ago.

In other words, I want to compare Sun – Sat this year with Sun – Sat 52 weeks ago.

 

Right now I am using the two dates this year – 365 days for each date.

 

Jim

 

Reply via email to