YEAR() and MONTH() not working...?
Michael Geary
listmail at gearyweb.com
Fri Feb 21 10:06:27 CST 2003
In ViSQL with my DB I enter:
"select
Documents.DocDate
from
Documents
"
and I get 322 rows.
But when I enter:
"select
YEAR(Documents.DocDate)
from
Documents
"
I get 0 rows.
DocDate is a date field. What am I doing wrong? Ultimately, what I want
to do is:
SELECT * FROM Documents ORDER BY YEAR(DocDate) desc, MONTH(DocDate) asc
that is, I want to sort descending by year, but ascending by month.
However, this query doesn't work. Please help.
thanks,
michael
More information about the Valentina
mailing list