Created
April 22, 2011 14:52
-
-
Save Eugeny/936817 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
public final class test { | |
public static void main(String[] args) { | |
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd HH:mm:ss yyyy"); | |
try { | |
sdf.parse("Apr 21 09:37:04 2011"); | |
} catch (ParseException e) { | |
e.printStackTrace(); | |
} | |
} | |
} | |
-------------------------------- | |
java.text.ParseException: Unparseable date: "Apr 21 09:37:04 2011" | |
at java.text.DateFormat.parse(DateFormat.java:337) | |
at test.main(test.java:12) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment