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?
+3
A:
Something like this:
=FormatDateTime(Now, DateFormat.ShortDate)
Michael Maddox
2009-09-08 18:21:40
+1
A:
Found the solution on http://ssrslearningcurve.wordpress.com/2008/08/08/using-the-dateadd-function-in-ssrs/
This gets the last second of the previous day:
DateAdd("s",-1,DateAdd("d",1,Today())
This returns the last second of the previous week: =dateadd("d", -Weekday(Now), (DateAdd("s",-1,DateAdd("d",1,Today()))))
Jeff
2009-09-08 18:22:25
I stumbled here from google.. but.. this doesn't answer your question. (why do you care about the last second?) However, you did beat RSolberg (who correctly answered it). Maybe you should edit your accepted answer to reference his correct answer?
itchi
2010-08-26 00:29:32
+4
A:
Since SSRS utilizes VB, you can do the following:
=Today() 'returns date only
If you were to use:
=Now() 'returns date and current timestamp
RSolberg
2009-09-08 18:32:41
+1
A:
In the format property of any textbox field you can use format strings:
e.g. D/M/Y, D, etc.
Zaid Zawaideh
2009-09-09 16:02:46
+2
A:
=CDate(Now).ToString("dd/MM/yyyy")
Although you are hardcoding the date formart to a locale.
Perhentian
2010-01-19 17:18:40
+1 for the concise answer that, as a matter of fact, was very helpful to me.
jasonco
2010-01-20 10:52:16