How can you get the current date in YYYYMMDD
formate in a Atlassian Bamboo
script?
Asked
Active
Viewed 2,553 times
2 Answers
1
DATE=$(date +%Y%m%d)
It doesn't work for, but
DATE=$(date +%%Y%%m%%d)
works fine :) I have Bamboo 3.4.1

Ivanoff
- 103
- 2
- 8
0
If it's in bash, it's:
$ date +Y%m%d
20140815
If you want that in a variable, these ways are essentially equivalent:
DATE=`date +%Y%m%d`
DATE=$(date +%Y%m%d)

zerodiff
- 1,690
- 1
- 18
- 23