Getting a month from a date NOT using month() function! HELP!

  • Thread starter Thread starter Pedro Sendas Pereira
  • Start date Start date
P

Pedro Sendas Pereira

Hi

Is there a way to get the month from a date without using the month()
function?

If I have this date: 12-10-2003 and I want to get the month 10 withou the
month() function, what do I have to do?

Thank you
 
Hi

Is there a way to get the month from a date without using the month()
function?

If I have this date: 12-10-2003 and I want to get the month 10 withou the
month() function, what do I have to do?

Thank you

Format the cell as "m" (without the quotes)


--ron
 
But I can't use the numeric value, and that is what I need...

I need to work with the month value ....
 
Pedro Sendas Pereira said:
But I can't use the numeric value, and that is what I need...

I need to work with the month value ....

Try this:

=MATCH(TEXT(A1,"MMM"),{"Jan","Feb",.....,"Dec"})

You can fill in the months for yourself, but it should give you 1 for
Jan, 4 for Apr, 10 for Oct etc.

HTH,

Alan.
 
Peo Sjoblom said:
Why not just?

=TEXT(A1,"mmm")

Bacause that will return "Oct" when he was asking for 10.

However, this is better still:

=VALUE(TEXT(A1,"MM"))

Alan.
 
I thought he didn't want 10?
If he wants a numeric 10 he should use month

=MONTH(A1)

If he wants a text 10

=TEXT(A1,"mm")

if he by some weird reason should want a numeric 10, BUT not using the month
function
then why not

=--TEXT(A1,"mm")

which is shorter than value
 
But I can't use the numeric value, and that is what I need...

I need to work with the month value ....

Why can't you use the MONTH worksheet function? That would be simplest.

You could use:

=TEXT(A1,"m")

Even though it is a text function, for most math XL will convert it to a number
automagically.

If it must be a number, you can use:

=--TEXT(A1,"m")



--ron
 
Back
Top