Author |
Message
|
LearningMB |
Posted: Tue Jan 21, 2014 2:26 am Post subject: Conversion of timestamp - GMT to EST using ESQL |
|
|
Newbie
Joined: 21 Jan 2014 Posts: 9
|
Hi,
I am a new bee to MB and ESQL. I need to write a code to convert a given timestamp from GMT to EST. Any help on this is highly appreciated. |
|
Back to top |
|
 |
exerk |
Posted: Tue Jan 21, 2014 2:38 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Your first bit of help - post in the correct forum! This was moved from Links  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
zpat |
Posted: Tue Jan 21, 2014 3:08 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Read the infocenter.
This function is built in - there is extensive support for TIMESTAMP manipulation - try using CAST, or just try a direct assignment to get an implicit cast.
(Watch out for BST if you use that - it's not what you might expect it to be!). _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
LearningMB |
Posted: Tue Jan 21, 2014 4:08 am Post subject: |
|
|
Newbie
Joined: 21 Jan 2014 Posts: 9
|
I tried this. But it say's Syntax error. No other compilation error
DECLARE INTRVL CHARACTER;
DECLARE CURR_TMSP TIMESTAMP;
SET INTRVL = LOCAL_TIMEZONE;
SET NEW_TMSP = TIMESTAMP CURR_TMSP + INTERVAL INTRVL MINUTE
Please help! |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jan 21, 2014 4:26 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you search on this forum for...
LOCAL_TIMEZONE
you will find a lot of examples that will help you out here. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|