Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Excel - Convert a full date into just a month

cpc34 (TechnicalUser) (OP)
26 Feb 08 5:06
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.
ClulessChris (IS/IT--Management)
26 Feb 08 5:50
try yourcell = Month(date)

Never knock on Death's door: ring the bell and run away! Death really hates that!

GlennUK (MIS)
26 Feb 08 6:28
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.

Salut39 (TechnicalUser)
26 Feb 08 7:52
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
SkipVought (Programmer)
26 Feb 08 8:22





You can also uset the TEXT function...

=TEXT(A1,"m")
=TEXT(A1,"mm")
=TEXT(A1,"mmm")
=TEXT(A1,"mmmm")

for various results.

I almost ALWAYS prefer to KEEP the date.  If you can live with the first of the month, then...

=DATE(Year(A1),MONTH(A1),1)

and then FORMAT to show whatever you want.  But a REAL DATE has soooooooo many advanatages over any kind of STRING.

Skip,

glassesI'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

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close