John
I'm going to venture a response (guess, speculation, display of ignorance, etc.) to your challenge - there are two parts to the answer. Part one: The format(value,"mmmm") returns "January" or "December" for 2,3, or 1 respectively because there are 4 emmms ("mmmm"). 3 emmms ("mmm") returns an abbreviation ("Jan" or "Dec"), 2 emms ("mm") returns a numeric value with a leading zero ("01", "12") and 1 emm ("m") returns a numeric value without a leading zero ("1","12").
Part 2 is less about Access and more about Windows. The 'fix' for the Y2K bug specified that December 31, 1899 has a value of "1", January 01,1900 has a value of "2", etc. I speculate that when MS was working out the solution to the Y2K bug, the code writers were initially concerned with making certain that a two-digit year entry would be recorded as being in the current century. So for testing purposes they had only specified a range broad enough to span more than one century (12/31/1899 - 01/02/2000). Only after making the code work correctly did they then add the negative numbers
Rick..
----- John Vinson wrote: ----
On Wed, 3 Mar 2004 22:28:33 -0800, "Chris
I need to convert a value of 1 to 12 to display the corresponding full nam
of the month. ie 1 as january etc. I have tried formatdate( value, "mmmm"
but doesn't work pretty sure there must be an easy solution for this
Chri
A couple
Switch([Monthno], "January", "February", "March", "April", ...
or
Format(DateSerial(2000, [Month], 1), "mmmm"
Quiz for the curious: explain why Format(value, "mmmm") return
December for 1 and January for 2 through 12. Prize is one free answe
in the newsgroup...<g
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=publi