Home:ALL Converter>Milliseconds to UNIX timestamp

Milliseconds to UNIX timestamp

Ask Time:2010-03-11T04:21:26         Author:t.vb.w

Json Formatter

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 86400 (number of seconds in a day) to get the # of days. But I'm not sure where to go from there.

Many thanks.

Author:t.vb.w,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/2420288/milliseconds-to-unix-timestamp
thelost :

Divide it by 1000",
2010-03-10T20:23:25
C. K. Young :

Dividing by 1000 is enough to get a Unix timestamp. You don't need any numbers of days or anything like that.",
2010-03-10T20:23:06
yy