Date String to Month Number??

B

Bill

Hi All,

I'm sure I am missing something obvious here!!

I have a field populated with three character month names, Jan, Feb, Mar
etc. I would like a calculated field in a query to display the Month Number
with Jan as 1, Feb as 2 etc and can't spot it!!

Can anyone help please?

Ta.
Bill.
 
J

Jeff Boyce

Bill

Take a look at the Format() function. You can use it to display (*rather
than calculate*) a date as MMM -- no need to store that separately if you
already have a date/time field. Use a query to help with the formatting.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Douglas J. Steele

And if you don't already have a date/time field, you can use:

Month(CDate("01 " & [MonthNameField] & " 2007"))

where MonthNameField is the name of the field containing your 3 character
month.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top