Showing results for 
Search instead for 
Did you mean: 

Routine Code Error - Issue Important

Former Member
0 Kudos

Hello Guys,

I have converted date and time diff into Seconds.

Now i want to convert seconds into HH:MM in the end routine.

Could you please provide the syntax or code to get the result.



Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

if t_sec contains the time value in seconds then:

data : hrs(2) type n,

min(2) type n,

sec(2) type n.

data result(8) type c.

hrs = t_sec div 3600.

t_sec = t_sec - hrs * 3600

min = t_sec div 60.

t_sec = t_sec - min * 60.

sec = t_sec.

concatenate hrs ':' min ':' sec into result.

All the best !!



Former Member
0 Kudos


Refer this thread