Please enable JavaScript to view this site.

 

Navigation: Tokens > Year Tokens

Conditional Year Tokens

Scroll Prev Up Next More

There are 2 types of conditional year number tokens; those based on the day of the year and those based on the month of the year.

 

Based on the day of the year

 

In an analogy to other conditional date tokens, you can prefix any of the year tokens with the letter "s" (s for start), to have these tokens appear only for the first day of the year (on any other date they will be converted to a blank, not deleted). For example:

 

•On January 1st, 2027, the tokens [syy] and [syyyy] will be converted to '27' and '2027', respectively.

•On January 2nd, 2027, the tokens [syy] and [syyyy] will both be converted ''.

 

Based on the month of the year

 

To display the year number only in January and/or in December, use the following tokens.

 

•[YYyy] and [Yy] will only appear in January.

•[yyYY] and [yY] will only appear in December.

•[YYYY] and [YY] will only appear in January and in December.

 

Some remarks :

 

•Do not confuse the [yyyy] and [YYYY] tokens; they are very different.

•Use filler tokens suffixes if the current token is next to a separator such as "-" or "/" and you do not want that separator to appear when the conversion of [YYYY] is blank.

 

Use the comparative year token, if you need more options over the condition under which the year number appears than available with this token.

 

See also: year tokens.

 


Topic 108848, last updated on 19-Oct-2026