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

Function Module for converting timestamp

Former Member
0 Likes
3,596

Hi all

I have a scenario where in the timestamp is getting stored in a z table in the UTC format (i.e. 20,100,125,080,528).

Now when i have to display this value to the user, it should be like "25.01.2010 08:05:28". Is there any standard function module to accomplish this? or is it like i have to do it in my code using the offset?

please guide me.

Thanks in advance.

Regards

Gaurav

3 REPLIES 3
Read only

Former Member
0 Likes
1,552

Hi,

U can use Standard SAp FM, can also use Offset.

Simple --Goto -> SU01> Give the User Name> Click Change burtton> Click on Defaults Tab--. Can Change the Date Format.

Regards

Arbind

Read only

Former Member
0 Likes
1,552

you can use the class CL_ABAP_TSTMP for arithmetical operations with time stamps.

please check the link..

http://www.sapnet.ru/abap_docu/ABENTIME-STAMP-GENERAL.htm

Read only

Former Member
0 Likes
1,552

Hello

Use this:


DATA: 
tstamp  TYPE timestamp, 
d TYPE D VALUE '19971224', 
t TYPE T VALUE '235500'.
CONVERT TIME STAMP tstamp TIME ZONE 'UTC+12' INTO DATE d TIME t.

Just press F1 on TIME STAMP.