• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

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?

0
Rahamathulla_J
Asked:
Rahamathulla_J
1 Solution
 
daniel_ballaCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now