How to convert seconds to datetime? I try this, but results are not correct:
datetime
CONVERT(datetime, DATEADD(ms, dateTimeInSeconds, 0))
Informative time span string:
declare @seconds int = 93825 convert(varchar,(@seconds/86400)) + 'd:' + format(dateadd(ss,@seconds,0),'HH\h:mm\m:ss\s')
Result: 1d:02h:03m:45s