0

I have json format of TimeStamp:

{
    "time":1443435459000,
    "javaClass":"java.sql.Timestamp"
}

My question is how to create Date from it.

Vu NG
  • 280
  • 3
  • 20
  • Please search StackOverflow before posting. This issue has been asked and answered many times already. – Basil Bourque Nov 29 '15 at 20:08
  • No such thing as a "JSON format of Timestamp". JSON offers [very few data types](https://en.m.wikipedia.org/wiki/Json), and none are date-time related. – Basil Bourque Nov 29 '15 at 20:12

1 Answers1

0

You can do it by this:

Calendar start = Calendar.getInstance();
start.setTimeInMillis( timeStampValue.getTime() );

Date myDate = start.getTime();
Marcinek
  • 2,144
  • 1
  • 19
  • 25