Breaking News

Editors Picks

Wednesday, November 30, 2011

How to find difference between two Dates in C#

How to find difference between two Dates in C#

DateTime sdate = DateTime.Now;
DateTime edate = DateTime.Parse("30/11/2011", CultureInfo.CreateSpecificCulture("fr-FR"));

TimeSpan ts = edate - sdate;
int days = ts.Days;
if (days>=0)
{ }
Else
{ }

 

Read more ...

Contact Us

Name

Email *

Message *