Date formating yymm

S

sconstance

I'm trying to take a start and end day and figure out how many years and
months is inbetween. Except I need the outcome to be in the format of yymm. I
can get just the number of months easy but can't figure out a way to get it
in that format.

Ex End Date - 2/1/2031 Start Date - 1/1/2008 = 277.22 months (rounded
to) 277 months

But I need the cell to return 2301 for 23 years 01 months
 
C

Castell

Divide the value by 12 to get years. Use the MOD function to get the
remaining months.
 
N

Niek Otten

=INT(A1/12)&TEXT(MOD(A1,12),"00")

But look here for a more precise way:

http://www.cpearson.com/excel/datedif.aspx

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| I'm trying to take a start and end day and figure out how many years and
| months is inbetween. Except I need the outcome to be in the format of yymm. I
| can get just the number of months easy but can't figure out a way to get it
| in that format.
|
| Ex End Date - 2/1/2031 Start Date - 1/1/2008 = 277.22 months (rounded
| to) 277 months
|
| But I need the cell to return 2301 for 23 years 01 months
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

YEAR MONTH DAYS COUNTER 3
Excel date format trouble 2
convert # of years, months and days 4
Auto date for contracts 1
Excel Help with dates 2
balance date 3
Changing Date for Pivot Table Result 2
Excel 1 vs 10 in Excel Formula 0

Top