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

Convert Date to a Specific Timezone

Former Member
0 Likes
11,925

Hi everyone,

Is there a function module or command we can use to convert a date and/or time to a particular timezone?

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,218

Hi,

Use the FM '/OSP/TIMEZONE_DETERMINE' or '/SOMO/GET_TIMEZONE'

Hi everyone,

Is there a function module or command we can use to convert a date and/or time to a particular timezone?

Thanks!

4 REPLIES 4
Read only

Former Member
0 Likes
7,218

The following Syntax is used to convert Date and time to time zones.

CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.

CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.

As long as <tst> has type P(8) or P(11) with 7 decimal placed, and <tz> has type C(6), the time stamp <tst> will be converted to the correct date <d> and time <t> for the time zone <tz>.

Also

'IB_CONVERT_FROM_TIMESTAMP' should help converting time to specific time zone

Vinodh Balakrishnan

Read only

abdul_hakim
Active Contributor
7,218

Hi

Use SY-DATLO and SY-TIMLO for getting local date and time.

Cheers,

Hakim

mark all useful answers

Read only

Former Member
0 Likes
7,219

Hi,

Use the FM '/OSP/TIMEZONE_DETERMINE' or '/SOMO/GET_TIMEZONE'

Read only

Former Member
0 Likes
7,218

Hi Maple,

You can use this FM

ISU_DATE_TIME_CONVERT_TIMEZONE

To get the converted date and time for the specific time zone

Regards Rk