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
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Parameter Format - Format Date and Time to Date

Author  Topic 

pcride
Starting Member

9 Posts

Posted - 2011-09-28 : 01:39:45
Hi I have a report that has 2 parameters, they work but the issue is my data for the Date field is a Date and Time field, so when I choose the drop down in the Reporting Services preview, I see many selections for the same date.

In sql I used Cast([Created Date] as Date) and that displays my date time field to only date, but it doesn't seem to work in the Reporting services query.

Any ideas?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-28 : 01:44:37
use
distinct Cast([Created Date] as Date)
if you're using sql 2008 or above

else use
distinct dateadd(dd,datediff(dd,0,[Created Date]),0)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -