cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello experts,

I have a problem with Unix timestamp conversion.

SAP Abap developers convert a date field to a unix value with code blocks. I want to read this value from the database and convert it back to date format. I am sharing this code block with you.

vbrk-fkdat = '2022.12.27'
CONSTANTS comp_nine(20) TYPE c VALUE '09182736455463728190'.
        datc = gw_vbrk-fkdat.
        TRANSLATE datc USING comp_nine.

As a result of this operation, they find the value datc = 79778772 and write it to a table. I want to read this datc value and convert it to date. How should I go about this. Have you met before? How can I do this process on Data Services?

0 Likes
View Entire Topic
Oenedoef
Explorer

basically, you can convert the value back and then assign it to the date value?

Something like this:

CONSTANTS comp_nine_back(20) TYPE c VALUE '90817263544536271809'.
        TRANSLATE datc USING comp_nine_back.
    gw_vbrk-fkdat = datc.