tags:

views:

274

answers:

2

Hello,

Anyone have any idea how I would go about converting a timestamp in milliseconds from 1970 (from android's System.currentTimeMillis();) to a UNIX timestamp? It need only be accurate to the day.

I figure I could divide by 1000 to get seconds, and then divide by 86 400 (number of seconds in a day) to get the # of days. But I'm not sure where to go from there.

Many thanks.

+4  A: 

Dividing by 1000 is enough to get a Unix timestamp. You don't need any numbers of days or anything like that.

Chris Jester-Young
+7  A: 

Divide it by 1000

thelost