I am stuck in a weird situation and unfortunately,even after doing some RnD and googling, i am unable to solve this problem.
I have a date string in ISO format, lik
I also did not care about timestamp/timezone as I am returning only dates from SQL in ISO format. To avoid the day being either one ahead or one behind when converting to Date object, this works:
moment(ISOStringHere, 'YYYY-MM-DD HH:mm'); // leaving off Z makes it UTC to match database
This requires the Moment JS library located here:
https://momentjs.com/