How can I get a current date-time and pass it as a variable to some Deployment task?
For those who use Linux on tfs:
Make sure it has "Settable at queue time set"
set-build.date.sh:
#!/usr/bin/env bash
DATE=$(date '+%d/%m/%Y %H:%M:%S')
echo "##vso[task.setvariable variable=BUILD_DATE;]$DATE"
Other options are listed here.
Type bash to find this task.
Done, you can use BUILD_DATE variable in later tasks :)