I\'m trying to post json data to a Controller in Java.
This is my controller:
@ResponseBody
@RequestMapping(value=\"/{schoolId}\", method=RequestMeth
Since you are using moment there is a simple way to achieve this :
let startDate = moment().toISOString();
This will convert to valid LocalDateTime format
I got the same problem, solved it using:
var dateString = new Date().toISOString().substring(0,10);
or
var dateString = new Date().toISOString().split("T")[0];
Convert to ISO string ("2015-10-14T09:39:49.942Z"), then keep only first ten characters ie, the date.