Hi Deb
Formats such as "mmmm" are intended to work on dates, not numbers.
So, Format("06/06/2006", "mmmm") translates the string ("06/06/2006") into a
date (6 June 2006) and returns the full name of the month ("June").
If you ask for a number (e.g. 1) to be formatted as a date, Access must
first try to interpret the number as a date. The way it does this is to see
the number as a number of days after an arbitrary "zero date", which happens
to be 30-Dec-1899.
So, 1 is 31-Dec-1899
and 2 is 1-Jan-1900
etc
That is why 1 is giving you "December" and every other number up to 12 is
giving you "January".
The solution is simple: Get rid of the Format property on that column, and
instead of DatePart, use the expression:
Format("mmmm", [DateReceived])
--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
Deb H said:
This is the formula I am using in a query to extract just the month from a
date field. =Datepart("m",[DateReceived]). The result I receive is 1, 2,
3
etc. Works fine until I format the column in the query to mmm. Then it
returns Dec, and Jan; not January, February, and March.
What am I doing wrong?