I need to convert JsDate
to java.util.Date.
I searched but I couldn\'t find anything. So could you help me with this problem?
Edit:
You can create a java.util.Date
object from the 'time since epoch' value of the JS Date
javascript
var d = new Date().getTime();
java
// get value from client (ajax, form, etc), and construct in Date object
long valueFromClient = ...
Date date = new Date(valueFromClient);
String formatted = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);