i want to know how compare two datetime values one who is retreived from sql database and the other is the current one with c#
The standard comparison operators (e.g. equality, less than, greater than) are overloaded for the DateTime type. So you can simply perform tests such as the following:
var foo = DateTime.Parse("01/01/1900");
var bar = DateTime.Now;
var test1 = foo == bar; // false
var test2 = foo != bar; // true
var test3 = foo < bar; // true
var test4 = foo > bar; // false