Solved

Dates in Crystal 11

Posted on 2011-03-03
2
355 Views
Last Modified: 2012-05-11
I have written a report which includes an order date. The problem is, that in some cases the order date is coming up as a different date than what is in the database. The date differs by 1 day.

I contacted the database administrator and his reply was:

"It could be because of the time zones and the format in which the data and time is stored in the database. In LN, the date and time are stored in data base in GMT time zone where as in the "Display Table Info" screens (within the program), it is shown in the user’s time zone.

When you read from Crystal, I guess you are reading directly from database. Hence, you may get 1 day difference in some cases. In your example, the order is created on 1st Mar 7.30 AM. In data base, this time as stored as 28th Feb 9.30 PM (because there is 10 hrs difference between GMT and Australia time). When you read from the database in Crystal, you get the date as 28th Feb. "

Any ideas how to address this in Crystal??

 

0
Comment
Question by:spectrum17
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35032815
If all datetimes are stored as GMT then you could write a formula to change the display to the local time.  That is what your application is doing.

A formula like DateAdd ('h',10,{DateTimeField})

Remember you may have to account for daylight savings time.  GMT doesn't change.

mlmcc
0
 

Author Closing Comment

by:spectrum17
ID: 35032890
Brilliant.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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