I have a date object as follows
let dateObj = Sat May 01 2021 20:21:00 GMT-0700 (Pacific Daylight Time)
I want to convert above value in this string format.
let stringVal = 2021-05-01T20:21:00.000+0000
can someone let me know how to achieve this. i Have tried toUTCString(), to DateString(), toISOString() and all other methods but i was not able to achieve the result in the format above.
Any guidance is appreciated. is it even possible ?