Expression in SSRS for date time

  • 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

  • Today() should do the trick

  • 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

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply