-1

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

How to convert it to Date()?

OPV
  • 1
  • 26
  • 81
  • 156

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
  • 11,688
  • 2
  • 14
  • 33