KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a string containing the UNIX Epoch time , and I need to convert it to a Java Date object. String date = "1081157732"; DateFormat df = new SimpleDateFormat(""); // This line try { Date expiry = df.parse(date); } catch (ParseException ex) { ex.getStackTrace(); } The marked line is where I'm having trouble. I can't work out what the argument to SimpleDateFormat() should be, or even if I should be using SimpleDateFormat().
Tags (comma-separated)
Save Edits
Cancel