I am working on project uses angular4(frontend) and java(backend). I get the date in below format from java backend server into angular server.
2018-05-23T18:30:00.000+0000
I need to convert it into javascript/angular Date object. I have tried below code
Date d = new Date(java_date);
but this gives Invalid Date error.
Any idea how to deal with above date format.
java_datemust have some other string (or something else) in it."2018-05-23T18:30:00.000+0000",i.e., as stringlet d = new Date(str)notDate d.Instant.now().toString()to get a standardZon the end rather than+0000.