PC Review


Reply
Thread Tools Rate Thread

Date formating yymm

 
 
sconstance
Guest
Posts: n/a
 
      4th Apr 2008
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
 
Reply With Quote
 
 
 
 
Castell
Guest
Posts: n/a
 
      4th Apr 2008
Divide the value by 12 to get years. Use the MOD function to get the
remaining months.


"sconstance" <(E-Mail Removed)> wrote in message
news:FB8A1AF7-4FDC-49B2-A6B4-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Niek Otten
Guest
Posts: n/a
 
      4th Apr 2008
=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

"sconstance" <(E-Mail Removed)> wrote in message news:FB8A1AF7-4FDC-49B2-A6B4-(E-Mail Removed)...
| 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date: End of last month as YYMM =?Utf-8?B?Qnl0aHN4LUFkZGFnaW8=?= Microsoft Excel Programming 2 24th May 2007 11:05 AM
Macro to auto save file using the format YYMM =?Utf-8?B?RG9scGhpbnY0?= Microsoft Excel Misc 1 29th Sep 2005 04:09 AM
importing YYMM dates from a text file Jeff Microsoft Access External Data 3 4th Mar 2005 06:23 PM
importing YYMM dates from a text file Jeff Microsoft Access VBA Modules 3 4th Mar 2005 06:23 PM
date formating and date data not compatible Kendra Microsoft Access Getting Started 1 6th Feb 2004 02:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:17 PM.