-1

I have local string date: 12/3/2018, 12:00:00 AM.

How to convert it to Date()?

POV
  • 11,293
  • 34
  • 107
  • 201

1 Answers1

1

Add a Z at the end of the localString

var a=new Date('12/3/2018, 12:00:00Z');
console.log(a);
ellipsis
  • 12,049
  • 2
  • 17
  • 33