Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Expression in SSRS for date time Expand / Collapse
Author
Message
Posted Friday, October 25, 2013 3:33 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, April 08, 2014 4:57 PM
Points: 225, Visits: 945
Hi Experts,

I got a dropdown in SSRS report where the end date is always today. By default the enddate should be todays date, but internally it should select days endtime.


Example:

The report should always select Endtime as today that is.
10/25/2013 but it should select values for the whole day.

If I use now() this is selecting time for this instant. and i dont want to display time part in dropdown.

Is it possible ?

Thanks a ton in advance
Post #1508616
Posted Tuesday, October 29, 2013 12:37 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:55 PM
Points: 1, Visits: 62
Today() should do the trick
Post #1509533
Posted Wednesday, October 30, 2013 1:01 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 07, 2014 7:35 AM
Points: 1,172, Visits: 2,413
SQListic (10/25/2013)
Hi Experts,

I got a dropdown in SSRS report where the end date is always today. By default the enddate should be todays date, but internally it should select days endtime.


Example:

The report should always select Endtime as today that is.
10/25/2013 but it should select values for the whole day.

If I use now() this is selecting time for this instant. and i dont want to display time part in dropdown.

Is it possible ?

Thanks a ton in advance


Look into using the TODAY() function to get today's date at midnight (e.g., 10/30/2013 12:00 AM) and the DATEADD() function to add 1 day. That will give you a date/time of 12:00 AM tomorrow (e.g., 10/31/2013 12:00 AM). Use this value to select everything where [date] < [TODAY() plus 1 day]. That will give you anything that is dated on the "end date".


Jason Wolfkill
Blog: SQLSouth
Twitter: @SQLSouth
Post #1509914
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse