Skip to Content
Former Member
May 15, 2012 at 02:02 PM

Data Time Zone issue in Crystal Reports



I am using Crystal Reports Version and I have been struggling with a time zone issue. I am writing report to be run with a web application. The server is in Sweden and the client is in London. I wanted to footer to have the date and time of the client at run time. I have a reserved internal parameter called "timezone_bias" that is passed through.

I attempted to use the Special Field "Data Time Zone" and found that it was only correct when the time has not been adjusted for daylight savings. When I noticed that issue, I began working on the solution below:

I have the following formula that works when we are not in daylight savings:

ShiftDateTime(DataDate+DataTime, DataTimeZone, {@ActiveTimeZoneBias})

Where ActiveTimeZoneBias = "XXX," & ToText({?timezone_bias},"#") & ",XXX"

The following formula works when we are in daylight savings:

ShiftDateTime(DataDate+DataTime, DataTimeZone, {@ActiveTimeZoneBias 2})

Where ActiveTimeZoneBias 2= "XXX," & ToText({?timezone_bias},"#") & ",XXX,0"

The issue with using those formulas is the fact that the schedule for daylight savings varies by country. I would then need to write a custom formula per run time location which would become a large task.

Does anyone have any advice for solving this issue?