Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Date Calculation need help

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-03-05 : 14:20:18
Hi Group:

Ok. Here is an interesting dilema..... I have a report that picks two dates a FromDate and ToDate.
At this point, the ToDate is been passed to the Report via SQL using the following expression:

DATEADD(mm, DATEDIFF(mm,0, @Req_End_Date), 0)

As you can see @Req_End_Date is a parameter. I want be able to use the same date expression in Reporting Services 2005. To get the first day, of the @Required_date, and current year.

Does anyone have an idea of how to do this? Thank you all,

dineshasanka
Yak Posting Veteran

72 Posts

Posted - 2008-03-05 : 17:31:09
=DateSerial(Year(Parameters!Req_End_Date.Value),Month(Parameters!Req_End_Date.Value),1)

---------------------
http://dineshasanka.spaces.live.com/
Go to Top of Page

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-03-05 : 17:59:12
Thank You dineshasanka, thank you.
Go to Top of Page
   

- Advertisement -