Last active
February 25, 2022 14:53
-
-
Save aaron-watts/32b897baa0cb5d927c5ce45d4f132c8d to your computer and use it in GitHub Desktop.
Format Date for date-formatted Google Sheets cells
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
function formatDate(d) { | |
const mm = d.getMonth() + 1; | |
const yy = d.getFullYear(); | |
const dd = d.getDate(); | |
return `${mm}/${dd}/${yy}`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment