Solved

Dates in Crystal 11

Posted on 2011-03-03
2
357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

739 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