Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

compare date with current date in android

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Date strDate = sdf.parse(my_date);
if (new Date().after(strDate)) {
    your_date_is_outdated = true;
}
else{
    your_date_is_outdated = false;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #date #current #date #android
ADD COMMENT
Topic
Name
4+5 =