Solved

Converting Week Number to Date

Posted on 2008-06-16
6
3,078 Views
Last Modified: 2013-11-27
Hi,
I am generating a report that displays trend data on a week by week basis.  I grouped my data set on the completion date by weeks:  Format("ww",Fields!Quantity.Value).  Now that I have the week number for the groups, I would like to display the chart using the Monday(or Friday) as the X axis label.  Is there a way to do this?  I'm using SQL Reporting Services 2005.
Thanks in advance!
0
Comment
Question by:keicy01
  • 2
  • 2
6 Comments
 
LVL 18

Expert Comment

by:chrismc
ID: 21800377
Not quite sure I understand.

You're grouping the data by week number but want to label it with day name?

0
 

Author Comment

by:keicy01
ID: 21802050
chrismc,
yes, I'm grouping the data by week successfully, I just can't get the label to display correctly.  I will like the label to display the first day of that week no.
thanks.
0
 

Accepted Solution

by:
keicy01 earned 0 total points
ID: 21802697
I was able to figure it out, see below:
=Format(DateAdd("d",(2 - Weekday(Fields!CompletedOn.Value)),Fields!CompletedOn.Value),"MM/dd")
This code returns the Monday of the completed date field in the MM/dd format.
Thanks.
0
 
LVL 18

Expert Comment

by:chrismc
ID: 21803931
Fine by me.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question