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

Converting GMT to local time aka IT server time. 2

Status
Not open for further replies.

lradon

Technical User
Dec 7, 2005
24
0
0
US
I am building in CR XI, a report that lists complaints that our call center receives on a daily basis. The only problem is that the Start_Date_Time for the comments is in GMT, so some of the comments look like they were entered late at night after we've closed or at 3:00am.

I wanted to use the following in a formula and place the formula on the report as the date of the listed comments. The report is built with tables behind it and not a SQL Command. I was told the follow code snipet would the trick.

Code:
{CONTACTDETAIL.START_DATE_TIME} + hour(current timezone)hours

However, when I try to save the formula, I get "Parenthesis Missing" with the word 'current' highlighted.

What is missing? I am stuck.


Thank you, Laura
SDMCU
 
In CR XI there is a function that converts based on timezone. I don't have access to that right now, not take a look in your functions list in the formula editor or do a search in the Help index.

-LB
 
If you know the hours difference, you could use something like:
Code:
DateAdd('h', 5, {CONTACTDETAIL.START_DATE_TIME})
Or use the ShiftDateTime() function.

- Ido


view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks you guys. I was given a resolution, but, was happening was, I wasn't understanding it. I have been heavily using CR 8.5/10 and only have been heavily using CR XI for 6-8 months now. This was the solution:

Code:
SQL expression named Timezone: Hour(current timezone)
Formula: DateAdd("h", +{%Timezone}, {START_DATE_TIME})

I had forgotten about SQL Expression's, so when I read create a SQL Expression, I misinterpretted it as SQL code. Well, I made the SQL Expression then made the formula with the expression inside and Voila!!!

Thanks to LB and Ido.!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top