Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 Online reporting service show specific format for datetime field

$
0
0

Hi everyone,

I'm currently working on a custom report and the requirement is very simple: always display date time field in local time with a specific format (ex: "dd/MM/yyyy").

The problem is:

1. When I use fetchXML to retrieve the data, datetime field alwasy return 2 fields for my dataset (one value (A) is datetime in UTC and one value (B) is string present the datetime in local user setting ). 

2. It's the best that I should convert value B to datetime (since it already in local time, in string type) and format the output string to "dd/MM/yyyy". I got a problem here, CDate() method in SSRS is not working perfectly (ex: CDate("30/07/2012") return error (?!))

3. So I try to use value A and use method ToLocalTime() but the value A has Kind = Unspecific event though value A is present a UTC datetime value. I cannot use DateTime.SpecifyKind method because of CRM 2011 Online Sanbox....

Anyone, please help me with this one. How to display date time value in local time with a specific format...

Thanks.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>