Confluence Template Variables
Confluence Data Center Template Variables
Documentation for DC is here https://confluence.atlassian.com/doc/create-a-template-296093779.html
There is nothing like global variables (probably).
It is possible add own variable by writing $ with name of variable and click on Create:
After creation is user able to define type of variable:
Editing of variables is not possible.
Deleting of variables is possible (automatically) when variable is not present in the template and user Save template.
There is a variable called $currentDate, but this is only included with the Meeting Notes Blueprint. There's a feature request below to be able to access those variables in other templates:
CONFSERVER-30567 Allow for access to common variables in Blueprints templates
If you're on Confluence Server, then you can write a User Macro to do this. There are more details on the thread below:
You can modify this User Macro to your needs, but you'd be able to insert the macro into any template you'd like and it'll automatically show the current date and time.
Confluence Data Center Template Variables
Documentation for Cloud is here https://support.atlassian.com/confluence-cloud/docs/create-a-template/