开发者

Show time tag in SSRS Parameter

I have an SSRS report with two parameters: StartTime and EndTime.开发者_Go百科 I have default values on the parameters to be set as the current date at 12:00am and the previous day at 12:00am.

However, since 12am is the default time on SSRS, it will not show in the parameter selection. What you see is, for example, '9/29/2011'. If there were to be a time other than 12:00am, you would see '9/29/2011 12:45:00.' Is it possible to get the report parameters to populate at 12am and still show the time? The reason I want this is because, although I know that it's possible to set a time, those using the report may assume you can only choose the date.

I feel like I did a pretty bad job explaining this. Here is a picture of what I have and what I want. I modified the EndTime to look like how I want it to look (by typing it in after the report was ran)

Show time tag in SSRS Parameter


I just tested this in SSRS 2008R2 BIDS: If I add a millisecond to the datetime, you'll get the time displayed as you want. I.E. set the default value to:

=DateTime.Parse("October 2, 2011, 12:00:00.001")

If this millisecond causes you problems elsewhere in the report, then test for this value and subtract a millisecond back out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜