-
Question copied from a user on a different forum: Is it possible to change the output of ";;date;" from "dd/mm/yyyy" to "yyyy-mm-dd" (including using dashes instead of forward slashes)? |
Beta Was this translation helpful? Give feedback.
Answered by
jon-heard
Aug 13, 2022
Replies: 1 comment
-
Go into the Inline Scripts settings and find the shortcut If you change the Expansion string from: return new Date().toLocaleDateString(); to: return new Date().toISOString().split("T")[0]; Then the shortcut should output in the format "yyyy-mm-dd". Alternately, if you want more control over the output, this also works: const d = new Date();
return d.getFullYear() + "-" + ((d.getMonth()+1)+"").padStart(2, 0) + "-" + (d.getDate()+"").padStart(2, 0); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jon-heard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go into the Inline Scripts settings and find the shortcut
^date$
.If you change the Expansion string from:
to:
Then the shortcut should output in the format "yyyy-mm-dd".
Alternately, if you want more control over the output, this also works: