none
Date Now() in SSRS

    Question

  • Hello,

    I am using below expression in SSRS, how can I just bring only date and avoid time? any help pls?

    =DateAdd("d", -1, now())

    Thanks


    John

    Thursday, September 27, 2012 6:06 PM

Answers

  • Hello,

    I am using below expression in SSRS, how can I just bring only date and avoid time? any help pls?

    =DateAdd("d", -1, now())

    Thanks


    John

    Hi,

    Just go to the text box properties of that expression ...click on "Number" which is below General tab and then click on "Date" category and chose the format you want to display.

    Thanks,

    FunBI

    Thursday, September 27, 2012 8:02 PM

All replies

  • dates declared in ssrs are defined as datetime. So, no running it from time. The question is, what do you want to do with it? You could use today(), that will always give you current date with 12:00:000 am time.

    =dateadd("d",-1,today())

    or 

    =today().AddDays(-1)

    good luck


    Think out of the box

    Thursday, September 27, 2012 6:34 PM
  • OK, so it seems like you are using a datetime parameter within your SSRS report and you don't want to give the option for someone to input a time, such as: "11:30:00" next to your date. This seems to be more of a SQL issue than an SSRS issue. SSRS will not give you the option to modify this as it is looking for datetime (both date & time), and SQL could use the DATEPART feature to take that part of the date you want (MONTH/DAY/YEAR). However, within SSRS itself you can't modify that....You either embrace it, or you communicate with your customers that your report does not look for time (even if they input it).  Please also note that the datetime value in SSRS is pulled from your Windows taskbar, which holds both DATE & TIME.

    Be more than a developer...be a business asset!

    • Proposed as answer by Andy Data Thursday, September 27, 2012 7:12 PM
    Thursday, September 27, 2012 7:12 PM
  • Hello,

    I am using below expression in SSRS, how can I just bring only date and avoid time? any help pls?

    =DateAdd("d", -1, now())

    Thanks


    John

    Hi,

    Just go to the text box properties of that expression ...click on "Number" which is below General tab and then click on "Date" category and chose the format you want to display.

    Thanks,

    FunBI

    Thursday, September 27, 2012 8:02 PM