Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert datetime field

Status
Not open for further replies.

dful

Programmer
Sep 26, 2002
21
US
Hello,

This is my first time using Crystal Reports. I have created a report from a SQL database view. there is a datetime field that I am using to query my report. This is a daily report that I need to run. I have just found out that the data in my view is converted to GMT time which is 5 hours different from my time. As a result all of my transactions after 7:00 are being converted to 12:00 & are showing on my next days report. How can I subtract 5 hours from this field? Do I need to do it in the Select query.

Thank You,
 
Need more technical information

Crystal Version
Database/connectivity
Sample data
Expected output

Try:

dateadd("h",-5,{table.datetime}) < currentdatetime

Not sure what range you are needing

-LW
 
Have you tried setting a new field to convert the date?

For example create a new formula field and subtract .21 which is 5 hours prior.

Example using the CR currentdatetime function: currentdatetime - .21

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top