Solved

date comparison

Posted on 2006-11-16
1
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Coding for the first time 9 100
Include MS Database in Winforms Project using Intellilock 5 34
Header Font Size in Grid View 6 50
How to set focus on a dynamic control 18 50
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

732 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