Search code examples
reporting-servicesssrs-2012ssrs-expression

What is the difference between Today() and Now() in SSRS?


Is there a difference between Today() and Now()?

When I searched online for date expressions I noticed that both are used quite frequently to retreive the same information. Which expression should I be using?

Today() and Now() in a report:

<code>Today()</code> and <code>Now()</code> in a report


Solution

  • As your example shows, both return today's date, however Now() will also include the time when the expression was called. Today() will effectively be today at midnight.

    Difference between System.DateTime.Now and System.DateTime.Today goes into this in much more depth, though in the .NET context, not specifically SSRS.

    Which one should you use? Depends on what you want, as you can see they do two different things. Maybe if you don't care about a time component, use Today(), otherwise use Now().