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
trying to print to HP laserjet 2050 - and constantly have to hit "ok" button to print
Problem getting the Selected value of a CheckBoxList (used in a gridview)
HP-UNIX - compressing/zipping files that are 31GB
Updating a Data Set that has been returned from a Function or DLL
Default Printer Changes using Terminal Server
Deploying local user policies, non-domain
Can i delete the system cache folder under Application Data\Sun\Java\Deployment\c
ache ?
Remove exchange connection in Outlook
Routing Problem WatchGuard x750e Firewall
How to add scriptaculous to Wordpress Site?