Reporting Services Remove Time from DateTime in Expression

Jeff picture Jeff · Sep 8, 2009 · Viewed 149.4k times · Source

I'm trying to populate an expression (default value of a parameter) with an explicit time. How do I remove the time from the the "now" function?

Answer

Michael Maddox picture Michael Maddox · Sep 8, 2009

Something like this:

=FormatDateTime(Now, DateFormat.ShortDate) 

Where "Now" can be replaced by the name of the date/time field that you're trying to convert.)
For instance,

=FormatDateTime(Fields!StartDate.Value, DateFormat.ShortDate)