visual studio - format subtract dates result to "hh:mm:ss" -
i need format subtract 2 long date time result "hh.mm.ss"
open date closed date subtracted 01/01/2012 16:04 04/01/2012 17:07 3.01:02:58 02/01/2012 08:52 02/01/2012 17:03 08:10:27
using
closeddate.subtract(opendate)
return result in format d.hh:mm:ss
and using
datediff("h", opendate, closedate)
return hours (no minutes or seconds)
also tried
closeddate.subtract(opendate).tostring("hh:mm:ss")
not working
as many microsoft forums answered there no way
so used
datediff("s", opendate, closedate)
and passed result helper function return calculated time in format hh:mm:ss
Comments
Post a Comment