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#
I hope you find this article (DATEDIFF Function Demystified) useful, although it's specific to datetime in SQL, it's helpful for understanding how it's handled on the database side.