Solved

date comparison

Posted on 2006-11-16
1
227 Views
Last Modified: 2010-04-16
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
Comment
Question by:Rahamathulla_J
1 Comment
 
LVL 9

Accepted Solution

by:
daniel_balla earned 250 total points
ID: 17954274
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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question