HowTo: date type variables
Date type variables are designed to simplify the introduction of dates within a Docxpresso template via standard calendar widgets.
If we choose the date format within the editing interface:
Docxpresso offers the possibility to customize date formats although how to do so will be discussed elsewhere. By default a standard date format mm/dd/yyyy or dd/mm/yyyy (depending of the language of your Docxpresso installation) will be used although one may choose a different one if previously created as a custom validation:
In this particular case the end user interface will look like:
With the following result:
Default value
Like in any other variable one may choose a default value to be shown by default in the end user interface but the date variables have some specific additional functionality.
For example if one choose to write:
The current date will be loaded by default whenever the document is first edited.
If one chooses to write:
The number of days after the plus sign will be added to the current date, i.e. +1 will show by default tomorrow’s date. Note that if you introduce a negative number those number of days will be subtracted, i.e. +-1 will add “-1” days to the current date therefore showing yesterday’s date.