Skip to content

Instantly share code, notes, and snippets.

@BurningDroid
Created June 26, 2019 04:46
Show Gist options
  • Save BurningDroid/643f5b27b9fbaacbd219a06832c42a2c to your computer and use it in GitHub Desktop.
Save BurningDroid/643f5b27b9fbaacbd219a06832c42a2c to your computer and use it in GitHub Desktop.
[Javascript] DateTime convert
const strDatetime = "2019-06-18T09:21:48Z"
const longDatetime = Date.parse(strDatetime) // 1560849708000
const parsedDatetime = new Date(longDatetime).toString() // Tue Jun 18 2019 18:21:48 GMT+0900 (GMT+09:00)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment