Skip to main content
Solved

RIGHT() - Last 2 digits of Created time (year)


Forum|alt.badge.img+2

Is it possible to get the last 2 digits of the creation date (year) e.g. 20 for 2020 19 for 2019.

This is to use in a unique reference field (first 2 letters of name + “-” + last two letters of creation year + “-” + Auto ref number)

I currently have:
UPPER( LEFT(Created By,2)) & “-” & ( YEAR(CREATED_TIME()) & “-” & {Project Ref}
Which gives me:
E.g. AA-2020-101

Where do I insert the RIGHT(XX,2)?

I’ve tried the following but with a returned #error!:
UPPER( LEFT(Created By,2)) & “-” & RIGHT( ( YEAR(CREATED_TIME()),2) & “-” & {Project Ref}

Best answer by Rey_Crisostomo

Try using this to get the last 2 digits of the year:
MOD(YEAR(CREATED_TIME()), 100)

View original
Did this topic help you find an answer to your question?

2 replies

Try using this to get the last 2 digits of the year:
MOD(YEAR(CREATED_TIME()), 100)


Forum|alt.badge.img+2
  • Author
  • Known Participant
  • 13 replies
  • June 16, 2020

Perfect! thanks so much @Rey_Crisostomo


Reply