Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Convert a full date into just a month

Status
Not open for further replies.

cpc34

Technical User
Aug 16, 2005
22
GB
I need to pull a series of dates into days, months and years: ie. 25/01/03 into 25, 01, 2003 in 3 columns. I can get 25/01/03 to display as "January" by choosing a custom format (mmmm), but the underlying value is unchanged. If I "paste value" I get 37646. Is there a robust way of turning that 37646 into an actual value of 1 that really changes it, not just the way that it is displayed?

Thanks

p.s. I need to do it this way because I am merging the single-date data with some data that displays dates in 3 columns.
 
try yourcell = Month(date)

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Also see DAY and YEAR for your other columns.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
This is not going to change the date value but I find it useful:
date in A1: CellB1: =A1, and format the column as "mm" it will give you your number.

Yuri
 





You can also uset the TEXT function...
[tt]
=TEXT(A1,"m")
=TEXT(A1,"mm")
=TEXT(A1,"mmm")
=TEXT(A1,"mmmm")
[/tt]
for various results.

I almost ALWAYS prefer to KEEP the date. If you can live with the first of the month, then...
[tt]
=DATE(Year(A1),MONTH(A1),1)
[/tt]
and then FORMAT to show whatever you want. But a REAL DATE has soooooooo many advanatages over any kind of STRING.


Skip,

[glasses]I'll be dressed to the nines this week, as I go to have my prostatectomy...
Because, if I'm gonna BE impotent, I want to LOOK impotent![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top