How to parse a date from a string

http://langref.org/all-languages/dates/parsing/parse-datetime

In Java, using Joda Time:

DateTimeFormatter fmt = DateTimeFormat.forPattern(“yyyy-MM-dd HH:mm”);
DateTime dt = fmt.parseDateTime(“2008-05-06 13:29”);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s