I have this timestamp string July 29, 2022 02:23 AM EDT and I want to extract the EDT timezone name from it using moment.js. Is there any method provided by momentjs. I didn't find any option.
Can you help?
Maybe this way will work for you.
var dateString = 'July 29, 2022 02:23 AM EDT';
var dateObj = new Date(dateString);
var momentObj = moment(dateObj);
var momentString = momentObj.format('YYYY-MM-DD');