SSRS中的日期时间格式设置
我们有一个要求,其中日期时间值将传递给“String”日期类型(而不是“DateTime”)的报告参数。报告参数将是一个查询参数,即它将有一个值列表,传递的值应落入其中。
奇怪的是,如果传递给此参数的日期时间值以这种格式传递 mm/dd/yyyy hh :mm:ss AM/PM 则只有成功,否则会显示错误(如果月/日期/小时/分钟/秒具有单位数字值,那么我们也需要将单位数字值传递给参数)。
假设报表服务器从控制面板的“区域设置”中选择这种格式,我们尝试修改日期和时间。时间格式为 yyyy-mm-dd & HH:mm:ss 但结果是一样的。
经过更多研究,我发现了一些建议,指定更改 rdl 中的语言属性(我无法弄清楚如何更改),但这不是我正在寻找的解决方案。我还在此处找到了另一个主题,但它没有提供我们正在寻找的解决方案。 我需要了解这种格式是否在报表服务器级别进行控制?是否可配置。如果有人可以提供一些指导,那就太好了。
谢谢。
We have a requirement where date time values would be passed to the report parameter which is of "String" date type (and not "DateTime"). The report parameter would be a queried one i.e. it would have a list of values in which the passed value should fall in.
The strange part is that if the date time value passed to this parameter is passed in this format mm/dd/yyyy hh:mm:ss AM/PM then only it succeeds otherwise a error is displayed (If month/date/hour/minute/second is having a single digit value then we need to pass single digit value to parameter as well).
Assuming that the report server picks this format from the "regional settings" in control panel, we tried modifying the date & time formats as yyyy-mm-dd & HH:mm:ss but the outcome was the same.
On researching more I found some suggestions specifying to change the language property in the rdl (I was not able to figure out how) but this would not be the solution I am looking for. I also found another topic here but it didn't provide the solution we are looking for.
I need to understand if this format is controlled at the report server level & is it configurable. It would be great if someone can provide some guidance.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Format(,"mm/dd/yyyy hh:mm:ss AM/PM ")
那么区域设置是什么并不重要。
Format(,"mm/dd/yyyy hh:mm:ss AM/PM ")
Then it doesn't matter what the regional settings are.