Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to convert seconds to days,minutes,hours.

How to convert seconds to days,minutes,hours.

Former Member
replied

Hi try this

Create a formula:

@seconds:

numberVar D:=int(Truncate ({Seconds_Field} /(24*60*60)))*24*60*60; 
numberVar H:=int(Remainder(Truncate ({Seconds_Field}/(24*60*60)),60))*60*60; 
CStr(int(Truncate ({Seconds_Field}/(24*60*60))),"##") & " D " & 
CStr(int(Remainder(Truncate({Seconds_Field}/(24*60*60)),60)),"##") & " H " & 
CStr(int(Truncate({Seconds_Field}-D-H)/60)),"##")& " M " & 
CStr(int(remainder(Truncate({Seconds_Field}-D-H)),60)),"##") & " S "

Regards,

Vinay

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question