I work on java app which works with LinkedIn REST api. Api returns creationsTimestamp as number. My question is how to transform it into regular date. Thanks.
Asked
Active
Viewed 79 times
0
-
I assume this is a milliseconds since the epoch timestamp? Simply use the [appropriate method](http://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#ofEpochMilli-long-). – Boris the Spider Feb 22 '15 at 20:35
1 Answers
0
Timestamp stamp = new Timestamp(System.currentTimeMillis());
Date date = new Date(stamp.getTime());
System.out.println(date);

Nilnoc
- 101
- 1
- 13