Solved

Reporting Services UTC Date conversion

Posted on 2008-10-15
5
1,207 Views
Last Modified: 2012-05-05
I have an sql 2005 database with several fields that need to be timezone agnostic.  Using nHibernate interceptors we have fixed the application side and everything is happy.  The problem is with our reports.

We are using SQL Reporting Services 2005, the reports reside on a server that lives in MST.  The users (most, but not all of them) reside in CST.  The times are stored in the DB in UTC.

So I am aware of using the following code:
System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!ShipDate.Value) but this will only convert to server time.

The basic question: Is there a way to convert dates in the report either from UTC to the client's time or from MST to the client's time?  Ideally the solution would be something akin to the nHibernate Interceptors so I could convert the report dates from UTC on the client.
0
Comment
Question by:RockHead
  • 2
5 Comments
 
LVL 15

Expert Comment

by:MohammedU
ID: 22727239
Check the following article may help you...
http://articles.directorym.net/Stitching_Up_Time_Zones-a923861.html
0
 
LVL 3

Author Comment

by:RockHead
ID: 22735360
So for the points, assuming that I pass in an arbitrary time zone to my SQL services report.  How can I use that information to actually convert the UTC datetime into that time zone based on the DST status of the datetime?
0
 
LVL 3

Author Comment

by:RockHead
ID: 22744019
So the solution to the problem was actually to pass in the utc offset and the daylight saving times of the client machine into each report.  Then, using a custom assembly, convert the utc times based on the utc offset and daylight times passed into the reports.  This isn't as ideal as finding a way to intercept the report on it's way back to the client.  But it works relatively well.

Since I didn't end up using your resource as part of this answer, I'm going to have to ask for the points to be refunded.

Thanks,

David
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 22967559
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question