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

krynil picture krynil · Dec 9, 2015 · Viewed 10k times · Source

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

Answer

Ian Preston picture Ian Preston · Dec 9, 2015

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().