Get previous year the last two digit

Hello All,

tell me please how we get the previous year (for example if we have 2022)
we get just 22

Thank you

now.AddYears(-1).toString(“yy”)

Hi @nora_ziani,

You can try this

Subtract years from now and convert the return string to only year.

Now.AddYears(-1).ToString("yy")

image

Thank u lot it is working!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.