In my React project, I am using material-ui TimePicker with momentUtils. Upon selecting a date I am getting the value as a moment object that has the following elements:
_d: _isAMomentObject: _isUTC: _isValid: _locale:
I noticed my date value is coming at the '_d' element in this format:
Tue May 05 2020 11:08:00 GMT+0700 (Indochina Time)
Now I have been trying to save this value on my mysql db, where my field date is of date type and I just keep getting mysql error: "Incorrect date value". So what are considered valid dates on mysql and how can I parse the value I am getting as a valid date before sending it to db?
Thanks in advance.