‎2007 May 01 5:02 PM
Hi
In my down load prg I am displaying the time by using sy-uzeit. but now what I required is I want to display time in user selected time zone. How I have to do.
thanks,
suma.
‎2007 May 01 5:24 PM
See the code below
DATA: v_timestamp TYPE timestamp,
v_tzone TYPE timezone,
v_date LIKE sy-datum,
v_time LIKE sy-uzeit.
v_tzone = 'INDIA'.
GET TIME STAMP FIELD v_timestamp.
CONVERT TIME STAMP v_timestamp TIME ZONE v_tzone INTO DATE v_date
TIME v_time.
WRITE:/ v_date,
v_time.
‎2007 May 01 5:07 PM
Hi,
Instead of using the fields SY-DATUM and SY-UZEIT, use the fields SY-DATLO and SY-TIMLO to get local time from the specified time zone for the user.
Regards,
Ferry Lianto
‎2007 May 01 5:15 PM
I am getting 5hours differance even I used EST time zone for system and user.
‎2007 May 01 5:24 PM
See the code below
DATA: v_timestamp TYPE timestamp,
v_tzone TYPE timezone,
v_date LIKE sy-datum,
v_time LIKE sy-uzeit.
v_tzone = 'INDIA'.
GET TIME STAMP FIELD v_timestamp.
CONVERT TIME STAMP v_timestamp TIME ZONE v_tzone INTO DATE v_date
TIME v_time.
WRITE:/ v_date,
v_time.
‎2007 May 01 5:28 PM
Hi Suma,
Please try this FM TZ_SYSTEM_TO_LOCAL to convert system to local.
Regards,
Ferry Lianto