‎2008 Jul 30 2:35 PM
Hi all,
I have timestamp format like this '20070522064742'
but i need this like '22.05.2007 12:17:42'
Regards,
Suresh
‎2008 Jul 30 2:40 PM
Hi,
First you can split it into different fields, then concatenate all the required fields into your required format.
Regards,
Bujji
‎2008 Jul 30 2:40 PM
Use 'CONVERSION_EXIT_TSABI_OUTPUT' to get the
desired result.
Regards,
Michael
‎2008 Jul 30 2:42 PM
data : v_date like sy-datum,
v_date1(10).
data : v_time like sy-uzeit,
v_time(8).
data : v_stamp(14) value '20070522064742'.
v_date = v_stamp+0(8).
v_time = v_stamp+8(6).
write v_date to v_date1.
write v_time to v_time1.
concatenate v_date1 v_time1 into v_result separated by space.
‎2008 Jul 30 2:43 PM
hi,
do this way ...
do this way ...
data : v_string(15) value '20070522064742',
v_out(20).
concatenate v_string+6(2) '.' v_string+4(2) '.' v_string+0(4) ' ' v_string+8(2) ':' v_string+10(2) ':' v_string+12(2) into v_out.
write : v_out.Regards,
Santosh
‎2008 Jul 30 3:12 PM
Hi,
You can use the following function to get the date and time from time stamp
ABI_TIMESTAMP_CONVERT_FROM
after getting the value, you can use translate for using dot insted of '/'.
Please award points if you find the answer useful.
‎2008 Jul 30 3:21 PM
Hi ,
if i do anyof those i am getting wrong time stamp.
Please see my qusetion again.
For the time stamp 20070522064742 the date and time are
22.05.2007 12:17:42.
please guide me.
‎2008 Jul 30 3:56 PM
The problem is resolved.
I am using FM IB_CONVERT_FROM_TIMESTAMP for the same
Thanks to all.
‎2008 Jul 30 3:59 PM
If you use conversion exit (function module) 'CONVERSION_EXIT_TSABI_OUTPUT' it expects the timestamp that you pass in to be in UTC. It will then convert the timestamp from UTC into the users local timezone and displays it as you want it. In case the timestamp you have is not in UTC, you have to convert it into UTC first.
Look at the ABAP documentation for the CONVERT statement.
Hope that explains it,
Michael