cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a Timestamp in COPA

mstrein
Active Participant
0 Kudos

Hi Experts,

have a timestamp in COPA CE1* structure. According to F1-Help it contains the number of seconds since 01.01.1990 0:00.

Anybody got a nice trick to translate it into date and time?

Thx Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member93896
Active Contributor
0 Kudos

Hi Michael,

here's a solution:

REPORT z_convert_timestamp.

PARAMETERS: timestmp LIKE ce1idea-timestmp.

DATA: g_date TYPE d, g_time TYPE t.

CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_OUTPUT'

EXPORTING

i_dayst = sy-dayst

i_timestmp = timestmp

i_tzone = 0

IMPORTING

e_date = g_date

e_time = g_time.

WRITE: / timestmp, '=', g_date DD/MM/YYYY, (8) g_time USING EDIT MASK '__:__:__'.

Regards,

Marc

SAP NetWeaver RIG, US BI