You are doing one of the worse of the very usual mistakes of beginners this days: trying to work with string representation of data instead of data.
Isn't this obvious: two points of times showing identical time or identical data are still identical, even if they are shown in different string representations, due to d
ifferent formats/cultures? Compare time, not strings:
System.DateTime thisInstance = System.DateTime.Now;
System.DateTime someOtherTime =
if (thisInstance == someOtherTime)
if (thisInstance >= someOtherTime)
Why, why comparing strings representing time or date, ever?
You need those strings, for example, when you need to show them on screen.
First, learn about all
System.DateTime.ToString
methods:
http://msdn.microsoft.com/en-us/library/system.datetime.aspx[
^].
Second, learn formatting:
http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx[
^],
http://msdn.microsoft.com/en-us/library/az4se3k1.aspx[
^],
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx[
^].
That's all.
—SA