Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query : timestamp conversion to reference timezone

Former Member
0 Likes
1,044

Hello All,

I am having a program with below statement for calculating the valid to date timestamp :

CONVERT

DATE date

TIME '235959'

INTO TIME STAMP lv_timestamp

TIME ZONE lv_tzone.

here, LV_TZONE is will be taken for the location.

Now, using above statment, for date 28.06.2012, I am getting output 29.06.2012 03:59:59 for the timezone EST.

I am now, want to convert timestamp 29.06.2012 03:59:59 back to 28.06.2012 23:59:59.

Kindly help.

Best Regards,

Vivek

Edited by: Vivek Kulkarni on Feb 13, 2012 12:01 PM

5 REPLIES 5
Read only

Former Member
0 Likes
876

Hi,

What is the server timezone ??? As you are getting time zone as EST , so hopefully LV_TZONE = EST. Hence its correct one w.r.t server you are working. Now 28.06.2012 23:59:59 is ur system timezone or servertime zone ? So check whats the current time zone and do the changes accordingly.

Read only

former_member214857
Contributor
0 Likes
876

Hi Vivek

You can use SY-TZONE to rever it back

Best regards

Read only

0 Likes
876

Hello All,

Thanks for your replies...

Hello Dear Carlos,

I am getting SY-TZONE = 3600.

Can you pls explain how I can use this value to get the mentioned timestamp.

Thanks & Regards,

Vivek

Read only

0 Likes
876

Hi,

Try using the TZONE from USR02 table for the current user id.

You can get the system time zone for the client from table TTZCU.

Read only

Former Member
0 Likes
876

Hi,

Instead of that use this FM CACS_DATE_GET_TIMESTAMP.

thanks and regards.

Aswath.