Solved

Dates in Crystal 11

Posted on 2011-03-03
2
352 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now