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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/ Time field formula

Status
Not open for further replies.

rhoneyfi

MIS
Apr 8, 2002
200
US
I have a date time field that is in East Coast Time. I would like to convert all of the field to West Coast Time...any idea how?

note: the formula needs to take into consideration the following:


Ex: 5/2/03 1:00 ( 1 am EST) should be converted to 5/1/03 22:00 (10 pm PST)

Thanks
 
Crystal cannot convert the data in your database, if that is what you are asking for, but it can give you a report of these values.

Dateadd("h",-3,{YourDateTimeField}) will subtract 3 hours from the datetime field. Then you can just format the field the way you want it to look.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
This can be done using a SQL expression, but it is database and version dependent, which you might share in your next post.

There is an excellent UFL offered by Ido Millet, one fo the strongest contibutors here to handle this within Crystal:


If you just want a 3 hour less date, create a formula containing:

dateadd("h",-3,{table.datetimefield})

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top