Click here to Skip to main content
15,920,468 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two datagridviews , in one gridview1 iam displaying values , in that i have column date that has to comapare with current date and that has to show in gridview2 like
eg:
12/10/2011 - 12/10/2012
like 365days
Posted
Comments
Sandeep Mewara 5-Oct-12 8:08am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

i don't understund very well your question, but you can use follow method to compare two dates:

C#
TimeSpan ts = DateTime.Now.Subtract(yourDate);
var days = ts.TotalDays;


Regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900