Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to display an "All Day Event" date correctly in an integrated SSRS Report?

$
0
0

I have two event items in a calendar list in SharePoint 2010. Both items have the same start time and end time. One of them, however, has the "All Day Event" checkbox checked. If I access them through a REST service, this is how the data is returned:

<!-- item 1 --><d:StartTime m:type="Edm.DateTime">2014-03-21T00:00:00</d:StartTime><d:EndTime m:type="Edm.DateTime">2014-03-25T23:55:00</d:EndTime><d:AllDayEvent m:type="Edm.Boolean">false</d:AllDayEvent><!-- item 2 --><d:StartTime m:type="Edm.DateTime">2014-03-21T00:00:00</d:StartTime><d:EndTime m:type="Edm.DateTime">2014-03-25T23:59:00</d:EndTime><d:AllDayEvent m:type="Edm.Boolean">true</d:AllDayEvent>

I have a report in the same SharePoint 2010 site that uses SSRS in integrated mode. The data source is the calendar list mentioned above.  The date fields are not formatted, just displayed as them come from the list/database.

My locale is set to en-US. When I run the report, the start date for item 1 is displayed as "3/21/2014" ('all day' set to false) but the start date for item 2 is displayed as "3/20/2014" which is incorrect ('all day' set to true).

I did some research online and found out that SharePoint stores all date fields as UTC except for 'All Day Events', which are stored in local time (our servers are in Central Time, but I'm running the report fom Pacific Time, in the US).

I coudn't find a solution to display the date correctly in the integrated SSRS report. Is there a way, maybe some straightforward formatting, to show All Day Event dates correctly? I tried adding hours but this is inconsistent with daylight saving hour changes.

I would appreciate any help.

 



C#, Sharepoint


Viewing all articles
Browse latest Browse all 11571

Trending Articles



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