[AccessD] Pick out the Year

DWUTKA at marlow.com DWUTKA at marlow.com
Thu Jan 29 14:23:18 CST 2004


Just setup the field like this:

MonthYear: Format([YourDateField],"mmyyyy")

Then group that field.  Should do the trick.  You can't 'parse' a date data
type, because it's not a string (it's actually a double floating point.).
To get the Month, or Year of a date, use the Month() and Year() functions.
However, you just want to format the month/Year combo, the Format function
works well.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
To: 'Access Developers discussion and problem solving'
Sent: 1/29/04 11:27 AM
Subject: [AccessD] Pick out the Year

I have a date field showing the standard date format of mm/dd/yyyy. I
need
to group and count records by the month & year. For example, I need a
count
of all records entered in January 04.

How do I parse out the month from the date? I tried the left function,
but
get a data type mismatch.

Virginia
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list