CINXE.COM

Just a moment...

<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="robots" content="noindex,nofollow"><meta name="viewport" content="width=device-width,initial-scale=1"><style>*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{display:flex;flex-direction:column;height:100vh;min-height:100vh}.main-content{margin:8rem auto;max-width:60rem;padding-left:1.5rem}@media (width <= 720px){.main-content{margin-top:4rem}}.h2{font-size:1.5rem;font-weight:500;line-height:2.25rem}@media (width <= 720px){.h2{font-size:1.25rem;line-height:1.5rem}}#challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+);background-repeat:no-repeat;background-size:contain;padding-left:34px}@media (prefers-color-scheme:dark){body{background-color:#222;color:#d9d9d9}}</style><meta http-equiv="refresh" content="390"></head><body class="no-js"><div class="main-wrapper" role="main"><div class="main-content"><noscript><div class="h2"><span id="challenge-error-text">Enable JavaScript and cookies to continue</span></div></noscript></div></div><script>(function(){window._cf_chl_opt={cvId: '3',cZone: "stackoverflow.com",cType: 'managed',cRay: '8eb123ffebc79d12',cH: 'HmbbzHf4XGnVOVqwtZx6bFX0NTorFpVdb8mwqdGmJ6k-1733035801-1.2.1.1-gw048WXPjs1ayuYo9Mw_IxXABWGwH0ws.BR9DhvajnFkY1GCD18pQqD1GnNzXc04',cUPMDTk: "\/questions\/39735724\/how-to-parse-iso-8601-into-date-and-time-format-using-moment-js-in-javascript?__cf_chl_tk=q0t_2VNXOjungNY_PS0uC749DGq7QLC.DYIRkmV0mcA-1733035801-1.0.1.1-PwTUzET3esjYlaPdyZokRNLEtJfaTF7tao9HE.dMl0w",cFPWv: 'b',cITimeS: '1733035801',cTTimeMs: '1000',cMTimeMs: '390000',cTplC: 0,cTplV: 5,cTplB: 'cf',cK: "",fa: "\/questions\/39735724\/how-to-parse-iso-8601-into-date-and-time-format-using-moment-js-in-javascript?__cf_chl_f_tk=q0t_2VNXOjungNY_PS0uC749DGq7QLC.DYIRkmV0mcA-1733035801-1.0.1.1-PwTUzET3esjYlaPdyZokRNLEtJfaTF7tao9HE.dMl0w",md: "r7xWEbmF3GcGxqH.s_0AjWvo0.iHqgu1W0s39WT37aY-1733035801-1.2.1.1-7T01wGpqSpiyCxcpcXVdtCER95t4FpFhaCFSwBypiILFIVNn1E2CrDlSPhphbT6rk_GNaYMB78PJDIpIMiiwtFD0piqX6sOnnW4wkqCn8ECW_H2l14yWo3_rvGGngt101ejczuUS4KLDvhAfir4OdpxtOzZWjrlbIq_4xhb.rvWh2ujTnkijcTgH731sR.ZRuYMrfJJAKh1FT6mbY5YpJCLjdKNO1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BfiG7SGHhdT1qhYZAxJR9CAcwCAixzqI_SSxV3cWql80q5SCQiCQYHF1NRWeZ00A0I6w.790ssuKc6ONpSiYh_a3khNmL0r3_ebwgtjKM5UI_zO.Iyeif3fJeea1v3UMy4ZCAq5GJRHKW0vyyXQjvKd_IZ0DY.9AXD7vGPd1Rw5Nr8inGNyR69SC0DGH7vEJ9qgR921XIG_DnAs4rxePCV1SiCEt.vXGe4mox8XgHvr7NXObOxX5eFhya2ImEDw9jrYcUKO0jxeWc0GELtL0vT.G8RA3efgq_aDT2KY1gkqOSSJKaz7Ln_xz6IcYQ_47kH1PCZnbtAh2WtTPtVQDNrHcalmgXyjfw7uTZ47I.HeJvffnu9K9UFM8GaU20Oq8_tYS3klz5cktTQ_cae12o4XjaNtjdX74GidzhZ.xq7nzh38LFxVHByiDU7CJWqwfFhtkps7Rwph1cBsEs9s2V_x0XeujjbOs6uFssqc3xp0o1hE0J2u.bujreHi8gn1Um2ivePPJGmygsY13QOd1OOSKV3pH9QycJgSBf7G6_UYSelVqmxA.dfcDkVmvGPy6zRyo_QPl5YOJ_PJ3JZF0ev2Ma2eqTCnlFkOEeWxgVLS37eIpYOly.H8uHMSjaPsoDGU8NMS_2XXCXJ61SOCH"};var cpo = document.createElement('script');cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1?ray=8eb123ffebc79d12';window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;if (window.history && window.history.replaceState) {var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;history.replaceState(null, null, "\/questions\/39735724\/how-to-parse-iso-8601-into-date-and-time-format-using-moment-js-in-javascript?__cf_chl_rt_tk=q0t_2VNXOjungNY_PS0uC749DGq7QLC.DYIRkmV0mcA-1733035801-1.0.1.1-PwTUzET3esjYlaPdyZokRNLEtJfaTF7tao9HE.dMl0w" + window._cf_chl_opt.cOgUHash);cpo.onload = function() {history.replaceState(null, null, ogU);}}document.getElementsByTagName('head')[0].appendChild(cpo);}());</script></body></html>