Skip to content

Instantly share code, notes, and snippets.

@kibotu
Created September 22, 2015 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kibotu/d80545ef4d3700a4f832 to your computer and use it in GitHub Desktop.
Save kibotu/d80545ef4d3700a4f832 to your computer and use it in GitHub Desktop.
parse date format
/**
* Format dd.MM.yy hh:mm e.g.: 24.09.15 12:26
*/
public static Date parseDate(final String date) {
final DateFormat df = new SimpleDateFormat("dd.MM.yy hh:mm");
Date result = null;
try {
result = df.parse(date);
} catch (ParseException e) {
e.printStackTrace();
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment