Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Need to extract the current year only from a form calc date variable


Level 1


I need to extract the year only from a date variable.How can I use the num2date(date()) to do this?

eg. num2date(date(), "YYYY MM DD") retunrs me the whole date, but I need only the current year.

Thanks in advance.


1 Reply


Level 10


use $ = Num2Date(date(), "YYYY")

and the display pattern date{YYYY}