How to convert date format in sqlite?
I want to convert "13 Jul 2011 06:50:00 PM" to "2011/07/13 18:50", store it in an sqlite DB, and retrieve it with the reverse transformation. How could I do this? Please give me some example code.
Thanks in开发者_高级运维 advance..
Use this:
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd, HH:mm");
String dateString = formatter.format(new Date(date));
精彩评论