makingitbig
asked on
how do I calculte the week of the year calculation in visual studio 2010
I need to calculate the week of the year for an SSRS report that I'm writing using Visual Studio 2010. There are Day, Month and Year functions, but no Week function (like is available in Excel).
So, how do I calculte the week of the year calculation in visual studio 2010?
So, how do I calculte the week of the year calculation in visual studio 2010?
ASKER
I'm not familiar with variable declaration within calculated fields in an SSRS dataset; your example looks more like VB code, correct?
To compensate, I tried the suggestion in this form:
=CultureInfo.InvariantCult ure.Calend ar.GetWeek OfYear(Fie lds!ODR_DA TE.Value,C alendarWee kRule.Firs tDay,Dayof Week.Sunda y);
When I try to preview my report an error message appears essentially saying
'CultureInfo' is not declared. It may be inaccessible due to its protection level.
This occurred even though Intellisense recognized the CultureInfo.InvariantCultu re.Calenda r.GetWeeko fYear method.
Perhaps you could help me understand how to get the week of year from within an SSRS project.
To compensate, I tried the suggestion in this form:
=CultureInfo.InvariantCult
When I try to preview my report an error message appears essentially saying
'CultureInfo' is not declared. It may be inaccessible due to its protection level.
This occurred even though Intellisense recognized the CultureInfo.InvariantCultu
Perhaps you could help me understand how to get the week of year from within an SSRS project.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
adding System.Globalization. before CultureInfo and also before CalendarWeekRule did the trick.
Thanks!
Thanks!
ASKER
by the way, if you have links/recommendations on where I can learn more about all of the methods available (through Visual Studio?), I'd appreciate it.
There are many considerations for invoking it, depending on your culture specifics. Here is an example of usage:
Open in new window