Last active
August 29, 2015 14:01
-
-
Save need4spd/6ac5489d6daa8da783e5 to your computer and use it in GitHub Desktop.
Joda DateTime parse
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
//String to DateTime | |
//05/28/2014 11:31 | |
DateTimeFormatter fmt = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm"); | |
fmt.parseDateTime("05/28/2014 11:31"); | |
//Date to String | |
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm"); | |
String sqlTimeString = fmt.print(DateTime.now()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment