Week Number of the year

We have an object [Case Dt(truncated)]. From there we can get week number of the year using Week () function.

For example, 10/10/09 it gives 41 and 11/07/09 it gives 45.

Currently we have only data for 2009. My question is, if there is any data for 2006, 2007 and 2008, how can I combine the week number and year together ?

Something like, 44, 2008, …46, 2009 etc…


Developer_Designer (BOB member since 2009-08-09)

Concatenation of two objects year and weeknumber maybe, but if you’re going to use it to sort data in a report then you might need to have one dimension for year, one for week number & have them both in the table - year first.

But - you might run into trouble in years where the last week of the year overlaps one year and another. That would result in two columns or rows of data for one calendar week - one for a few days in the prior year, one for a few days in this for example.

You could get round this by using floor(relativedate([date a];[date b]))/7 to find the difference between two dates and convert it to weeks. I do that in a couple of reports to give me the number of weeks ‘ago’ a date was so I can filter a report on that number… Just thoughts.


SteveD :uk: (BOB member since 2009-11-02)