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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top