Reputation: 2917
Are there any ways to convert "Wed, 30 Nov 2011 09:13:00" to a timestamp besides programatically coding it yourself? Like any libraries/functions that can help accomplish this?
thanks
Upvotes: 0
Views: 617
Reputation: 934
Something like:
String dateStr = "Wed, 30 Nov 2011 09:13:00"; DateFormat formatter = new SimpleDateFormat("EEE, d MMMMM yyyy HH:mm:ss");
formatter.parse(dateStr);
Upvotes: 0
Reputation: 1901
Use JODA Time. It has format building capabilities for parsing dates and time.
Upvotes: 0
Reputation: 36777
SimpleDateFormat is your friend in this case
Remember that Date.getTime() returns miliseconds since the beginning of unix time.
Upvotes: 2