MySQL Forums
Forum List  »  General

Re: SELECT DISTINCT For Month and Year?
Posted by: James Maxon
Date: February 11, 2005 11:20AM

Okay, I think I am very very close.

When I use this:

---------
DIM mySQL
mySQL = "SELECT DATE_FORMAT('1997-10-04','%M %Y') as mon_yr FROM Y4K GROUP BY mon_yr;"
---------

It works great in giving me this: October 1997

But when I add the database field:

---------
DIM mySQL
mySQL = "SELECT DATE_FORMAT(DateEntered,'%M %Y') as mon_yr FROM Y4K GROUP BY mon_yr;"
---------

I get this for the results: ??????4

I looked at the database and I have the Data Type "Date" and the data in each field looks like this: 2004-12-25, which is the same as the format I used when I manually entered it in the example above.

So where is the conversion going wrong? I dont' think this is an ASP issue, anyone have any ideas?

Thanks!
- James

Options: ReplyQuote


Subject
Written By
Posted
Re: SELECT DISTINCT For Month and Year?
February 11, 2005 11:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.