java convert unix timestamp to date code example
Example 1: get current unix timestamp java
System.currentTimeMillis() / 1000L;
Example 2: date to timestamp java
All you need to do is change the string within the java.text.SimpleDateFormat constructor to: "MM-dd-yyyy HH:mm:ss".
Just use the appropriate letters to build the above string to match your input date.