Struggling to display a date in javascript that is retrieved from a postgres database and returned via python.
When I simply console.log the variable I get back from my GET request, it is in this format:
Thu, 12 Sep 2024 00:00:00 GMT
I’m simply attempting to display that as:
09/12/24
(I don’t know where the 00:00:00 GMT portion is coming from, but essentially I just want to discard that. It seems to be affecting my conversions for some reason.)
I AM using moment.js, but have not been able to get it to display the correct date. It always displays 1 day prior (9/11/24).
What would be the easiest method to simply display that returned datetime string as “09/12/24” (the time portion will never need to be accounted for)?