How can i set a Azure DevOps Pipeline Varible which contains the date in this Format: 25.07.2020
Since you are using the classic way, nested variables are not supported in the build pipeline. So, we could not use the variables like $(Get-Date -Format Date:MMddyy)
to set the date time.
We could only set the variable like:
$[format('{0:ddMMyyyy}', pipeline.startTime)]
In this way, we could get the value 10072020
, not the 10.07.2020
without .
. And I could not add any interval between ddMMyyyy
, it does not supported by Azure pipeline.
Besides, as workaround, we could defined the Build number format in the Options tab with value $(DayOfMonth).$(Month).$(Year:yyyy)
:

Then we could use variable $(Build.BuildNumber)
directly to get the date time:

Hope this helps.