Created
November 4, 2019 07:45
-
-
Save ma-9/910cd777aa5a15a24ccfa004b87763ac to your computer and use it in GitHub Desktop.
Get Date in dd//mm/yyyy format
This file contains 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 myDate = new Date().getUTCDate(); | |
const myMonth = new Date().getUTCMonth()+1; | |
const myYear = new Date().getUTCFullYear(); | |
const date = myDate.toString() | |
const month = myMonth.toString() | |
const year = myYear.toString() | |
console.log(date + "-" + month + "-" + year) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment