Conversion of String to DateTime : Android

前端 未结 2 777
太阳男子
太阳男子 2020-12-10 19:06

I have a field (named as time, but type is TEXT) in my Sqlite Database. In current format of that column is YYYY:MM:DD_HH:MM (as 2011:11:01_11:30 ). Now I have

2条回答
  •  感情败类
    2020-12-10 20:00

    Its best practice to use long data type for date-time value in-spite of text.

    Then you can use it in ur code simply by calling Date class constructor to get ur Date and Time.

    This makes ur sorting operation simply easy.

提交回复
热议问题