DateTime Comparison

  • Thread starter Thread starter yue
  • Start date Start date
Y

yue

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
 
yue said:
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

Just compare with the DateTime given by DateTime.Now.Date.
 
Back
Top