Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 242
krynil Avatar asked Dec 09 '15 11:12

krynil


1 Answers

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

like image 182
Ian Preston Avatar answered Sep 21 '22 11:09

Ian Preston