JavaScript Parse String to Date

Oct 24, 2019
const date = new Date('2019-10-18T00:00:00.000000Z')// note that local timezone is applied to the date, thus +8 hoursdate.toString() // Fri Oct 18 2019 08:00:00 GMT+0800 (Malaysia Time)date.toUTCString() // Fri, 18 Oct 2019 00:00:00 GMT

NOTE: Refer Convert Date to UTC

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.