开发者

Report Builder - Convert datetime to Local Time

开发者 https://www.devze.com 2022-12-23 12:14 出处:网络
I\'m using Report Builder 2.0 to construct a report that con开发者_如何学Pythontains datetime data stored in the database as UTC time. Is there a way to convert the UTC time to local time of the compu

I'm using Report Builder 2.0 to construct a report that con开发者_如何学Pythontains datetime data stored in the database as UTC time. Is there a way to convert the UTC time to local time of the computer viewing the report?

Thanks.


I seem to have stumbled upon the answer to my question. The Data Source View lets you specify whether a column holds local time or UTC time under the "DateTimeMode" property.


Be carefull using DateTimeConversion. Reports are shown by Client and computer by your Report Server. The dates used by ToLocalTime Method and DateTimeMode are converted to Your Report Server local time which could be different from the browsing client computer.


use this: TimeZone..::.ToLocalTime Method

look here too: http://www.windows-tech.info/15/9115c76955a6a6e1.php

0

精彩评论

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

关注公众号