CRM 2011 Online SSRS report UTC time to local time
来源:互联网 发布:网络密钥怎么设置 编辑:程序博客网 时间:2024/05/19 04:03
在CRM数据库中存储的时间都是UTC时间,所以当我们在做报表的时候需要将UTC时间转换为本地时间。
对于CRM On-premise来说,我们可以使用Filtered View,比如Filteredaccount里就有createdon和createdonUTC两列,createdon里的值就是本地时间了。
但对于 CRM Online来说,我们需要使用Fetch XML来query数据,就无法使用FilteredView了。我们从数据库中query来的只有UTC时间,我们需要在报表中将它转换为本地时间。如果你利用ReportWizard来生成一个最简单的报表,并包含一个createdon列在报表的table中,我们就可以看到这个转换函数了:
Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility.ConvertUtcToLocalTime(Fields!createdonValue.Value,Parameters!CRM_UserTimeZoneName.Value)
下面我把整个xml拷贝下来:
<Textbox Name="Table0_Header1"> <CanGrow>true</CanGrow> <UserSort> <SortExpression>=Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility.ConvertUtcToLocalTime(Fields!createdonValue.Value, Parameters!CRM_UserTimeZoneName.Value)</SortExpression> </UserSort> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>="Gemaakt op"</Value> <Style> <FontFamily>Tahoma</FontFamily> <FontSize>8pt</FontSize> <FontWeight>Bold</FontWeight> <Color>#ffffff</Color> <Language>nl-NL</Language> </Style> </TextRun> </TextRuns> <Style> <TextAlign>Center</TextAlign> </Style> </Paragraph> </Paragraphs> <Style> <BackgroundColor>#4f81bd</BackgroundColor> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style></Textbox>
- CRM 2011 Online SSRS report UTC time to local time
- UTC Time->Local Time
- how to convert UTC to local time
- C local time & UTC time
- convert utc time to local time in excel
- Azure Website - UTC Time and Local Time
- GPSTime To UTC Date Time
- UTC Time
- C++ UTC time to timestamp 转化
- Python: Convert UTC time-tuple to UTC timestamp
- Time::local
- ASP.NET MVC - Display UTC time from server as local time on client side
- [android] UTC Time
- Date Time Expression - SSRS
- Difference between Unix Time and UTC time
- python time 字符串转UTC
- Real-Time Local Reflections
- SSRS: How to Display Checkbox on Report
- 黑马程序员——CSharp基础
- 分享一个蓝屏代码查询器
- 斐波那契 非递归方法
- 扫雷程序-地雷位置生成
- C语言中volatile关键字的作用
- CRM 2011 Online SSRS report UTC time to local time
- 用sqlplus远程连接oracle命令
- hibernate实现对sqlserver 2005的增删改查
- cocos2d-x的action
- 道听途说Struts2之9:接收中文参数
- 道听途说Struts2之10:简单的数据验证
- struts2 的action动态调用时 报错
- tomcat(apache-tomcat-6.0.33)进不去
- NYOJ 520 & HDU 2136 Largest prime factor(筛法思想)