Date formatting in Android for Twitter

This one kept me up at night. I thought I had the right format string, but my dates never worked write, though the strings were ok. Then I found this at http://svn.liferay.com/browse/plugins/trunk/portlets/twitter-portlet/docroot/WEB-INF/src/com/liferay/twitter/service/impl/FeedLocalServiceImpl.java?r=23183

 SimpleDateFormat sdf = new SimpleDateFormat( “EEE MMM d hh:mm:ss Z yyyy”);  �
Date createDate;
createDate = sdf.parse(<yourTwitterCreatedAtDateStringGoesHere>);

Comments are closed.

March 2019
M T W T F S S
« Feb    
 123
45678910
11121314151617
18192021222324
25262728293031