Solved

date comparison

Posted on 2006-11-16
1
225 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now