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:
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()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With