DateTime.Compare how to check if a date is less than 30 days old?

Posted by James May on Stack Overflow See other posts from Stack Overflow or by James May
Published on 2009-02-09T14:36:33Z Indexed on 2010/05/25 6:41 UTC
Read the original article Hit count: 166

Filed under:
|
|

I'm trying to work out if an account expires in less than 30 days. Am I using DateTime Compare correctly?

if (DateTime.Compare(expiryDate, now) < 30)

{
     matchFound = true;
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET