The version number format string is used to generate the version number. It will be passed through unaltered, except that any expression of the form ${variable_name, argument} will be replaced according to the table below. Arguments are optional, and, unless otherwise specified in the table below, the argument is a string of length N, and the number will be left-padded with zeros until its length equals N. It will not be padded if its length already exceeds N. For example, if the build day is 5, then ${BUILD_DAY, XX} would return 05.

Any variable not recognized in the table below will be replaced by an environment variable of the same name. So to use the hudson build ID, stored in the environment variable BUILD_ID, you'd just use ${BUILD_ID}. If no environment variable of the appropriate name can be found, the expression will just be replaced with an empty string.

BUILD_DATE_FORMATTED If the argument for this is a quotes-enclosed java date format string, then this will be replaced with the build date formatted with that string. If there is no argument, then this will be the standard simple date format.
BUILD_DAY The day of the build.
BUILD_WEEK The week of the year of the build.
BUILD_MONTH The month of the build.
BUILD_YEAR The year of the build.
BUILDS_TODAY The number of builds done on this calendar date.
BUILDS_THIS_WEEK The number of builds done in this calendar week.
BUILDS_THIS_MONTH The number of builds done in this calendar month.
BUILDS_THIS_YEAR The number of builds done in this calendar year.
BUILDS_ALL_TIME The number of builds done since the beginning of the project.
MONTHS_SINCE_PROJECT_START The number of calendar months that have elapsed since the project start date.
YEARS_SINCE_PROJECT_START The number of calendar years that have elapsed since the project start date.

Note: BUILDS_TODAY_Z, BUILDS_THIS_WEEK_Z, BUILDS_THIS_MONTH_Z, BUILDS_THIS_YEAR_Z and BUILDS_ALL_TIME_Z are zero-indexed versions of the similar named variables from above. The override build numbers are NOT zero indexed, however, if you override Builds Today with 3, then BUILDS_TODAY_Z will be 2 for the next build.