Lyle Fairfield wrote:
mm/dd/yyyy is a format. It determines how a date is displayed. It has
nothing to do with how a date is stored in a field, nor in memory.
Dates are stored as eight bytes which are interpreted in a way
analogous to the way Doubles are interpreted, with the integer values
representing days since Larry Linson's date of birth (Dec 30, 1899) and
fractional amounts representing hours, minutes and seconds.
Month(Date) and Year(Date) are not dependent on date format; they
should "work" on any date.
You are correct. The format is not what I really meant to refer to.
To answer the orignal question, I was asking if there was a date field
in the table. If so, write a query to calculate the month and year.
Of course, you could also calculate the last day of the month of any
field. To me, that makes it cleaner because you only have one field to
contend with. Furthermore, I'd store that calculation of that field in
the table so I may refer to it at any time.
The orignal question does not indicate if there is a month field and a
year field or if there is just a date field to calculate the month and
year of said field.