How to calculate days in between two datetimepicker..??

Posted by Rock_Monu under ASP.NET on 8/31/2012 | Points: 10 | Views : 920 | Status : [Member] | Replies : 1
how to calculate days by two datetimepicker and this days insert in datagridview columns " days of present".




Responses

Posted by: Krv on: 11/28/2012 [Member] Starter | Points: 25

Up
0
Down
DateTime startTime = fromdate;
DateTime endTime = Enddate;
TimeSpan span = endTime.Subtract ( startTime );
return span.Days

Thanks,
R.Vasanth
MCTS(SQL Server & BI)
http://bigdatatech.blogspot.com

Rock_Monu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response