‎2021 Feb 26 8:09 AM
Hey Guys,
I have an ALV where i output some time fields from cr02. Now it looks like this: 19.800 but i need it like this: 00:00:00
How can i do it on a very easy way?
Kind regards
Mario
‎2021 Feb 26 8:50 AM
You will need to provide part of your code, especialy the field catalog
‎2021 Feb 26 9:01 AM
Hello
This is my type structure.
the data type is tims.
I select this fields from the table into the fields of my table.
Now i want to change this fields, so that they look like format 00:00:00
‎2021 Feb 26 9:09 AM
In the catalog, uUse the type D for dates (or DATS), not a numeric type like I, P, etc. (or INT4, DEC, etc.) Or indicate a field or a data element which refers to such a type.
‎2021 Feb 26 9:11 AM
‎2021 Feb 26 9:28 AM
Hello Sandra Rossi,
I output the alv like this. alv.png
so i think the output is like the fields from my types
‎2021 Feb 26 9:46 AM
But it is not a time, it is a number of second.
you have to play with it before display it:
could be something like that (I don't test the code)
data(hour) = time DIV 3600.
data(remaining_time) = time - (hour * 3600 ).
data(minut) = remaining_time div 60.
data(second) = remaining_time - ( minut * 60 ).
result = |{ hour }{ minut }{ second }|.
‎2021 Feb 26 10:45 AM
‎2021 Feb 26 7:55 PM
You'd better avoid indicating the important part of the question in a separate image. The 3 fields concerned are:
19,800 means 19800 seconds = 5 hours and a half
‎2021 Mar 01 10:46 AM
‎2021 Mar 02 1:44 PM