Created
September 22, 2015 13:45
-
-
Save kibotu/d80545ef4d3700a4f832 to your computer and use it in GitHub Desktop.
parse date format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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