ParseTime

try {
    // Some examples
    DateFormat formatter = new SimpleDateFormat("hh.mm.ss a");
    Date date = (Date)formatter.parse("02.36.33 PM");

    formatter = new SimpleDateFormat("HH:mm:ss Z");
    date = (Date)formatter.parse("22:14:02 -0500");
} catch (ParseException e) {
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.