Created
May 13, 2017 09:38
-
-
Save fty4/5395311b108656f46f96c8a03e681d77 to your computer and use it in GitHub Desktop.
Parse Date and Time to java.util.Date
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
java.util.Date date = new SimpleDateFormat("dd.MM.yyyy HH:mm").parse("29.04.2017 20:00"); | |
System.out.println(date); | |
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
System.out.println(sdf.format(date.getTime())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment