How do I get the last two digit of e.g. 2005? I did this:
Year(1/25/2005)
and I get 2005 but I want to list it as 05 instead.
Help is appreciated.
ljCharlie
How do I get the last two digit of e.g. 2005? I did this:
Year(1/25/2005)
and I get 2005 but I want to list it as 05 instead.
Help is appreciated.
ljCharlie
Hello Ljcharlie,
ShortYear = Format("1/25/2005", "yy")
Sincerely,
Leith Ross
Method 1(retains date value):
Format the date to only display the 2-digit year
Forma>Cells>Number Tab
Category: Custom
Type: YY
Method 2(Coverts value to text):
=TEXT(Year(1/25/2005),"YY")
I'm sure there are other ways, too.
Regards,
Ron
Thank you very much, it works!
ljCharlie
=right(year(today()),2)
@satishkumar62
This thread is from 14 years ago. It is highly unlikely the OP is still looking for a solution. Please respond to current situations. Welcome to the Forum. We look forward to your contributions to current issues.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
The thread might be old but the updated code just helped me. people bumping threads with updates is usually the best help because the threads are long since crawled and indexed.
Last edited by AliGW; 12-16-2019 at 03:02 AM. Reason: Personal comment removed.
Very helpful, thank you.
Thank you! Exactly what I needed!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks