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!

Converting a Report for time zones

Status
Not open for further replies.

rsunra

IS-IT--Management
Sep 30, 2003
53
AU
G'day I have following formula and I would like the time to be displayed in a different timezone for the report ie add 3 hours of 2.5 hours.


datetime (Totext ({Event_Date}, "dd/MMM/yy") & " " & Totext ({Event_Time}, "HH:mm:ss"))
 
What does add 3 hours of 2.5 hours mean?

You can add 3 hours to a datetime like this:

dateadd("h",3,datetime (Totext ({Event_Date}, "dd/MMM/yy") & " " & Totext ({Event_Time}, "HH:mm:ss")))

There's also a UDF which does some timezone stuff:


And depending upon your database and Crystal version, you might have it converted and returned on the server side using a SQL Expression.

-k
 
Thanks!

The 2.5 was for South Australia

With your help I was able to work it out with the following:

DateAdd ("h",2,dateadd("n",30,datetime (Totext ({Event_Date}, "dd/MMM/yy") & " " &
Totext ({Event_Time}, "HH:mm:ss"))))

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top