c# - Storing current time without milliseconds component -


i have timespan object needs hold time, without date. use

datetime.now.timeofday 

but problem gives time in format

15:51:51.7368329 

i don't want milliseconds component. how can trim out?

you can either use datetime.now.hour/minute/second properties or use datetime.now.tostring("hh:mm:ss").

refer here more info: http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -