Home Converting UNIX TimeStamp in Android API versions LESS than 24
Reply: 1

Converting UNIX TimeStamp in Android API versions LESS than 24

Snowflake232
1#
Snowflake232 Published in 2017-11-14 22:35:37Z

This question already has an answer here:

  • SimpleDateFormat gives API Error 2 answers

I am developing an app which I want specifically to work Android API 23. I need to convert a UNIX timestamp into an actual time/date.

I have seen this solution which mentions SimpleDateFormat;

Convert unix time stamp to date in java

However, this is only supported in API 24 and higher. Any ideas on how to achieve this in API 23?

premkamal008
2#
premkamal008 Reply to 2017-11-14 22:45:22Z

I think you may be using android.icu.text.SimpleDateFormat instead of java.text.SimpleDateFormat.

The former one was added in API level 24, the later one should work fine for all API levels.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318162 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO