Trying to create a timestamp snippet in VS Code that produces yyyy-MM-ddThh:mm:ssZ
.
Tried so far:
$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE","T","$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND","Z"
but the commas place each section on a new line.
2021-06-27
T
08:57:03
Z
How do I get the "T" and "Z" characters inline here?
You have to do two things:
,
's are seen as line breaks.${....}
so that they work properly with the other charcters T
and Z
right next to them. Otherwise the variables cannot be interpreted properly. So:"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}Z"