now() gives current date and time. use current_date() instead. hope it helps Nitin
----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 02, 2003 9:32 PM Subject: Date data type issue > Having a problem with a Date data type. > > Here's the query: > > SELECT distinct date_format(auditdate, "%Y%M" ) as listUrl, date_format( > auditdate, "%Y%m" ) as blank > FROM quality_history > WHERE auditdate <> Now() > ORDER BY listUrl desc > LIMIT 6 > > auditdate is a DATE datatype > > When I run this query the result datatype for both listUrl and blank is a > BINARY CHAR! Is that correct? Why a BINARY? Also, when I take out the > DISTINCT I get back a TIMESTAMP (pretty weird, huh?). I'm obviously missing > something. Any ideas on how I can return just a regular CHAR (or TEXT, or > VARCHAR, or DATE, or anything that looks like a DATE with the format of > %Y%M)? By the way, I'm running 3.23.51 on Windows 2000 > > Thanks in advance! > > > T.J. Kuhn > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]