Microsoft
Software
Hardware
Network
Question : TimeSpan Math
Is there a way to accurately return the diff between TimeSpans?
For example; inTrackLength = 00:54:16.1220000 and inTimeElapsed = 00:51:30.3910000
Dim TimeRemaining As TimeSpan = inTrackLength.Subtract(inT
imeElapsed
)
Since I am only displaying Hours:Minutes:Seconds
TimeRemaining is 00:02:45.7310000
I would expect TimeRemaining to be rounded to 00:02:46.
I guess my real question is how do I round-up TimeRemaining to the nearest second?
Answer : TimeSpan Math
you can try to check TotalMilliseconds part...
ms = ts.TotalMilliseconds
ts.TotalMilliseconds=0
if ms > 0.5 then ts.add(new (0,0,0,0,0,1,0))
Random Solutions
How to highlight row with color in document library in sharepoint 2010?
store comma separated multiple numbers in a mysql database field database and query them efficiently
Deploy Printer Drivers to WinXP Computers
Gateway for Server automatically being removed after restart
CRM Backstop
What are the default site bindings for port 443 on IIS 7 w/ Exchange installed
How do I properly setup "Internet Address" and install SSL certificate in SBS 2008?
SBS 03 with AD/DC is automaticall re-generated A Host Records
TDSSand other malware - prevent and removal tips / thinking
OWA will not work for mailbox in non-internet facing AD site