Beklo Home - Create your own free Blog. Upload Songs,Make Albums - Click Here to Signup
Tutorials Related to Sql ,Dotnet and Dotnet Faqs

comparing the two dates in c#

Posted on 2007-Dec-3 at 05:40 in ASP.NET

1)how to compare the two dates in c#

 

2)how to use the CompareTo  method in c#

 

 

  DateTime d1 = Convert.ToDateTime ("05 - 04 - 2007");


  DateTime d2 = Convert.ToDateTime ("05 - 04 - 2007");

 

 String a= d1.CompareTo (d2).ToString();

if d1>d2 then it returns 1


  if d1'<'d2 then it returns -1


if d1=d2 then it returns  0


Last Page | Page 13 of 27 | Next Page

Links

- Home
- My Profile
- Archives
- Site Feed
- Friends
- My Photo Album
-Technorati Profile
-Blogarama
-
eXTReMe Tracker
>
Add to Technorati Favorites

Friends