date comparison

I have to retrieve date from a Appconif file and check whether it is equal to current date?

How can i do the date comparison?

Rahamathulla_JAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
daniel_ballaConnect With a Mentor Commented:
Hi Rahamathulla_J,
something like:

DateTime d = DateTime.Parse(System.Configuration.ConfigurationSettings.AppSettings["configKey"]);
if (d == DateTime.Now)
    ......................

if the date format is not in the format of your default culture you can pass a second parameter to the Parse method to indicate the culture.


Cheers!
Dani
0
All Courses

From novice to tech pro — start learning today.