Hey everyone in my web application i am generating a verification code that is to be entered by user for account activation. I want that the generated verification code should be valid for specific time period say 12 hrs or 24 hrs. I am storing details of date and time when code is generated but how can i check for validity means suppose user entered code how can i check that he has entered code in validation period or not? How to compare date and time together? Thanks