date extraction issue from datetime column

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manny

    date extraction issue from datetime column

    Great that worked!

    I would also like to only provide a date in the where clause and not a
    timestamp (the field is of type datetime). I have tried using the
    date function but it does not appear to work. I tested the date
    function as per mysql
    manual(http://dev.mysql.com/doc/mysql/en/da...functions.html)
    but I get the following error:

    SQL-query:

    SELECT DATE( '2003-12-31 01:02:03' )
    MySQL said:

    #1064 - You have an error in your SQL syntax.
    Check the manual that corresponds to your MySQL server version for the
    right syntax to use near '('2003-12-31 01:02:03')' at line 1

    Any ideas?
Working...