Although you can compare dates as string, it is not wise. "Now" return a datetime structure, that is comparable as it should be. The approach you have taken in your code row pasted here is still good, but you have to look in opposite direction: make DateTime.Parse process your date format. You can do that, since the Parse
method has an overload[
^] that takes an IFormatProvider. If this format is specific to a culture, pass a culture:
DateTime.Parse(dateString, CultureInfo.CreateSpecificCulture("fr-FR"));
If not, make you own provider, or use
ParseExact[
^], by giving a proper format string.