This question already has an answer here:

I have got the following datetime from an API: 1395401384298

I am guessing it is in epoch miliseconds time (it should be one day in 2014) How can i convert it into a more readable String? I have been looking into DateString[] (https://reference.wolfram.com/mathematica/ref/DateString.html) with no success.


marked as duplicate by C. E., ciao, bobthechemist, Sjoerd C. de Vries, Michael E2 Mar 26 '14 at 23:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The epoch starts from jan 01 1970, so you can do:

to = AbsoluteTime[{1970, 1, 1, 0, 0, 0.`}];

DateString[1395858190 + to]

Wed 26 Mar 2014 18:23:10

From http://www.epochconverter.com/

GMT: Wed, 26 Mar 2014 18:23:10 GMT


It is in the very fa future :) DateString[1395401384298] "Tue 5 Jul 46118 23:38:18"

Adding a dot brings closer: DateString[1395401384.298] "Tue 21 Mar 1944 11:29:44"

So check the data you have received. János

  • $\begingroup$ That is the wrong answer i am getting. The right answer is GMT: Fri, 21 Mar 2014 11:29:44 GMT (you can check it in epochconverter.com ) $\endgroup$ – José D. Mar 26 '14 at 17:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.