Hi Manny,
You either have 2 DateTime values, or you have 2 strings in the format
11/22/04 9:00 AM and 11/22/04 9:30 AM. DateTime values don't have formats.
They are pure data. The System.DateTime class has many methods for comparing
DateTime values. In addition, some camparison operators can compare DateTime
values. For example:
Dim ahora As DateTime = DateTime.Now
Dim SomeDate As DateTime = SomeFunctionThatReturnsADate()
If SomeDate > ahora Then...
Note that I spoke of comparing DateTime values. DateTime is a Data Type.
Comparing 2 strings will only tell you which string is alphabetically before
the other.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
Hi, i have two datetime values in format 11/22/04 9:00 AM and 11/22/04
9:30 AM. How can i compare dates .net c# or if there is any other way such as
Javascript.
Thanks
Manny