Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Expression in SSRS for date time


Expression in SSRS for date time

Author
Message
SQListic
SQListic
SSC Veteran
SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)SSC Veteran (258 reputation)

Group: General Forum Members
Points: 258 Visits: 1115
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
rickdgibson
rickdgibson
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 72
Today() should do the trick
wolfkillj
wolfkillj
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1104 Visits: 2582
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search