0

I have a date string which looks like :

const date =  "23/03/2022"

and I am trying to convert into the

Tue Mar 23 2022 00:00:00 GMT+0530 (India Standard Time)

I tried using new Date(date) not able to do it .

can any one help me with this ?

ganesh kaspate
  • 1
  • 9
  • 41
  • 88
  • Here you can find the same [question](https://stackoverflow.com/questions/9873197/how-to-convert-date-to-timestamp#:~:text=Split%20the%20string,Update%3A) – Muhamet Smaili Mar 15 '22 at 06:15
  • `const d = new Date(date.split("/").reverse().map((v,n)=>+v-n%2));` – Bravo Mar 15 '22 at 06:16

0 Answers0