开发者

DateTime formatting in Android?

开发者 https://www.devze.com 2023-03-10 04:38 出处:网络
I have a date/time that I get from a sqlite database and want to sh开发者_运维百科ow in my Android app. I want it in the format :

I have a date/time that I get from a sqlite database and want to sh开发者_运维百科ow in my Android app. I want it in the format :

9 November, 12:12. How do I do this? Is it best to format it before or after I enter it into the database?


See the answers to this question.

In your database, I would suggest you keep timestamps in there rather than the formatted strings. That way your program would still work if you decide to change the format later.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号