Check out example codes for "asp net c# compare date to current". It will help you in understanding the concepts better.

Code Example 1

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");
                }

Learn ReactJs, React Native from akashmittal.com