DateTime Comparison

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yue

    #1

    DateTime Comparison

    Hello,

    I want to compare 07/29/2003 to System.DateTime .Now
    I never get a match. I suspect it has something to do with
    the timestamp after the date.

    How do I get rid of the timestamp?
    Or better yet, how do I get the dates to compare just on
    the date.

    ie I want 07/30/2003 compared to 07/30/2003.. and
    not 07/30/2003 8:36:39AM to 09/30/2003 8:36:39AM

    Thanks,

    yue
  • Jon Skeet

    #2
    Re: DateTime Comparison

    yue <yue@hotmail.co m> wrote:[color=blue]
    > I want to compare 07/29/2003 to System.DateTime .Now
    > I never get a match. I suspect it has something to do with
    > the timestamp after the date.
    >
    > How do I get rid of the timestamp?
    > Or better yet, how do I get the dates to compare just on
    > the date.
    >
    > ie I want 07/30/2003 compared to 07/30/2003.. and
    > not 07/30/2003 8:36:39AM to 09/30/2003 8:36:39AM[/color]

    Just compare with the DateTime given by DateTime.Now.Da te.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...