Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

asp net c# compare date to current

string date = "01/04/2013";
                DateTime myDate = DateTime.ParseExact(date, "dd/MM/yyyy",
                                           System.Globalization.CultureInfo.InvariantCulture);
                if (myDate > DateTime.Today)
                {
                    Console.WriteLine("greater than");
                }
               else
                {
                 Console.WriteLine("Less Than");
                }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #asp #net #compare #date #current
ADD COMMENT
Topic
Name
5+2 =