Created
August 6, 2022 16:48
-
-
Save hieptl/28f27e69e5a8dace554bda972f6d4ae4 to your computer and use it in GitHub Desktop.
How to Get the Current Date in Javascript - Format Date (HH:MM:SS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const currentDate = new Date(); | |
const hhMMSSTime = | |
currentDate.getHours() + | |
":" + | |
currentDate.getMinutes() + | |
":" + | |
currentDate.getSeconds(); | |
console.log(hhMMSSTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment