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#
You can use the DateTime.CompareTo method.
Usage is like this:
firstDateTime.CompareTo(secondDatetime);
and returns an int as a result which indicates
Less than zero - This instance is earlier than value.
Zero - This instance is the same as value.
Greater than zero - This instance is later than value.