Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the Month Number from a Date field


Hi There

I have a date field in the format DDMMMYYYY and in addition to the standard date information that I am extract from that field (i.e. month name, week commencing etc) I want create a field with the month number.

So the date of '01APR2015' should give me 4.

Any help appreciated.

JW

5 Replies
Anonymous
Not applicable
Author

=date(date#( '01APR2015' ,'DDMMMYYYY'),'M')

maxgro
MVP
MVP

=num(month(date#( '01APR2015' ,'DDMMMYYYY')))

Not applicable
Author

Fantastic, thank you!

Not applicable
Author

Brilliant, Thank you

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Bill,

Your solution does not return the month number. It runs the same date with a display format of "M".


=date(date#( '01APR2015' ,'DDMMMYYYY'),'M')

=date(date#( '14APR2015' ,'DDMMMYYYY'),'M')


would create two rows in a listbox or chart which is probably not what the poster wants.


-Rob