0

I want to get day name with date which is in string format in nodejs can anyone help how this can be done?

 let gameDate = bidDatarray[0].gameDate;// date : 27/12/2019
 console.log( gameDate.getDay());

This gives error that gameDate.getDay() is not a function

coder_B
  • 110
  • 11

1 Answers1

1

new Date('12/27/2019').getDay() you need to swap day with month.

Sekru
  • 515
  • 2
  • 11