Reputation: 3728
I have got bigint data from database query like below
duebydate:1302017399984
I want to convert the above duebydate to timestamp using java code
Could any one help?
I knew that in SQL Server we can use predefined functions to convert to timestamp
Upvotes: 0
Views: 293
Reputation: 2507
You can try using the SimpleDateFormat class:
String value = "1302017399984";
DateFormat format = new SimpleDateFormat("yyyyMMdd");
format.setLenient(false);
Date date = format.parse(value);
Upvotes: 1