Author: dst101 | Posted on: 7/23/2009 1:33:57 AM | Views : 1176

I have a DateTime value entered into my sql database.
What I would like to do is compare the DateTime value which is stored and todays date:
I have this:
DateTime oldDate = new DateTime(2009, 7, 20);
        DateTime newDate = DateTime.Now;

        // Difference in days, hours, and minutes.
        TimeSpan ts = newDate - oldDate;
        // Difference in days.
        int differenceInDays = ts.Days;

        if (differenceInDays >= 11)
        {
            Response.Write("Is greater");
        }
        else
  &n ...

Go to the complete details ...