Facing a strange issue wherein my react-native (with TypeScript) returns NaN for the following snippet but it works when I run the same snippet on a JS/TS console
const convertDateStringToSlotString = (date: string): string => { var dateObject = new Date(date); return `${dateObject.getHours()}:${dateObject.getMinutes()}`;};
Also tried logging dateObject and it returns Date { NaN }
Example string I am passing -> "2020-08-02 11:00:00+00"