[AccessD] DateName Function

Mike & Doris Manning mikedorism at verizon.net
Thu Jun 23 10:30:11 CDT 2005


Use DatePart to get the month name instead.

Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Keith Williamson
Sent: Thursday, June 23, 2005 10:47 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] DateName Function


Anyone know how to deal with this?

I am collating data for daily sales.  The data I am given is total sales per
day, for the past three years.  Ideally I want to turn this into a graphic
comparing monthly sales for each year (ie.  3-dimensional comparison of each
month's sales, compared to prior history.)

The problem I am having is that I run a sum query to give me monthly sales,
for each year, using the month function (ie.  Month([date]) &
year([date])...and summarizing on that.)

What I wind up with is:
Expr1:Month([date]) field = 1, 2, 3, 4,....12
Expr2:Year([date]) field = 2003, 2004, 2005
SumofSales field = currency value of sales for that month/year

One row of data that might be returned:

1, 2003, 25000


Now ...I can make a graph of this...but it doesn't look good 1-2003 vs.
1-2004 vs. 1-2005

Obviously...I would rather it say January 2003 vs. January 2004 vs. January
2005

BUT>>>>  When I try to use the DateName Function on Month([date])
field....it doesn't work:

DateName([expr1])

When I run the query, I get a request for value dialogue box for Expr1.

Do I need to format the function a certain way to get it to calculate
DateName on a function(month([date])??

Thanks for any help!!!

Regards,

Keith E. Williamson
Ashland Equipment, Inc
phone # (410) 273-1856
fax #     (410) 273-1859



-- 
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