Created
June 2, 2022 03:36
-
-
Save johnadan/02f12e0d6d7256603cbb97f5e5e4a032 to your computer and use it in GitHub Desktop.
change date format to string in javascript
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 dateValue = (datevalue); | |
const options = {year: 'numeric', month: 'long', day: 'numeric'}; | |
const dateFormatted = new Date(dateValue).toLocaleDateString('en-US', options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment