Page 1 of 1

How to calculate Week of the Year?

Posted: Mon May 31, 2010 4:43 pm
by lav4you
Hi All,

Is there any direct function to calculate Week of the Year?
Ex.
o1 Jan, 2010 = 1 (Week)
28 Jan. 2010 = 5 (Week)

Its available as a display format but no direct formula..as at the back-end it only preserves the serial number ex. 40269 for 01 Apr, 2010. and uses same for any calculation.
so is there any way simple way to calculate week of the year? or to use this dispay format values anyhow?

Re: How to calculate Week of the Year?

Posted: Mon May 31, 2010 9:08 pm
by Martin Ryan
I don't think there's any function for calculating the week, but you could do it a couple of ways. One would be to find the difference between the current day and the 1st of January, divide by seven, then round down.

The other option is to calculate it in Excel and store it as an attribute. That would be my preferred method.

Martin