Timestamp from Android device in the format hh:mm:ss:SS

前端 未结 1 645
情话喂你
情话喂你 2021-01-17 02:57

I have a requirement to log the sensor data in Android. In order to store the values in a Database, I need the timestamp as primary key in the format - hh:mm:ss:SS, where SS

相关标签:
1条回答
  • 2021-01-17 03:34

    use SimpleDateFormat, see tutorial here. But it's not recommended this approach, if you save it as a long, you can compare it, order, etc...

    0 讨论(0)
提交回复
热议问题