如何隐蔽的日期格式的源码? [英] How to covert date format in sqlite?
本文介绍了如何隐蔽的日期格式的源码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要隐蔽2011年7月13日下午6时50分○○秒为2011/07/13十八点50存储在对于SQLite数据库,并retrive反之亦然......怎么样?请给我的例子code ..
I want to covert "13 Jul 2011 06:50:00 PM" to "2011/07/13 18:50" store in to sqlite DB, and retrive vise versa... how? Please give me example code..
在此先感谢..
推荐答案
使用这样的:
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd, HH:mm");
String dateString = formatter.format(new Date(date));
这篇关于如何隐蔽的日期格式的源码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文