This content has been marked as final. Show 3 replies
Jon Kleiser wrote on May 20, 2009 16:05:
What we really want is to compare a truncated currentDate against a (truncated) deadline. Is there a nice and easy way to do that?
Let me Google that for you . Was that so hard?
Please try this,
SimpleDateFormat sdf = new SimpleDateFormat ( "MM/dd/yyyy" ) ; Date beforeDate = sdf.format ( dateobjecttobecompared ) ) ; if ( !beforeDate.before ( sdf.format (new java.util.Date ()))) return false;