Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

same day this year as last

Status
Not open for further replies.

darwin101

Programmer
Mar 7, 2001
156
US
hi all

I need to do a sales summary report that displays a figure for today Tuesday the 3rd and if possiable the Tuesday from last year that is as close to the 3rd as possiable.

The ultimate results would be a calendar like display that has sales for 2007 and 2006 by day (Monday, Tuesday ect)

any pointer would be appreciated.
 
The corresponding day of the previous year would be 52 weeks * 7 days ago - 364 days.

I'm not sure how you're approaching the data set development - but if it's done in sql server, you could use a dateadd function or similar.
 
thanks Paul
I am using SQL Server. You got me thinking in the right direction. I think I might look at the Calendar control from Dundas, not sure how else to do this in SRS

select datename(weekday,dateadd(dd,-364,convert(char(10),getdate(),121)))
, dateadd(dd,-364,convert(char(10),getdate(),121))
 
Do you need to display the values on the calendar itself, or allow the user to select the required date from a calendar?
 
they want to look at say.. a calendar view of this month and have the current month/year sales on the correct date and the sales from last year to display also, but they have to match up by Monday, Tuesday... ect.
I know... clear as mud.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top