pmessana
asked on
Comparing dates in MYSQL is not working after MYSQL upgrade
I have a query that has run for multiple years, we recently upgraded (5.0.45). It appears that comparing using the Date() function no longer is working correctly.
Attaching the query below, the ship_dt column is a timestamp column and we are only wanting to compare the date and not the entire timestamp.
As mentioned this worked perfectly fine under 4.x
Any help would be greatly appreciated.
Attaching the query below, the ship_dt column is a timestamp column and we are only wanting to compare the date and not the entire timestamp.
As mentioned this worked perfectly fine under 4.x
Any help would be greatly appreciated.
SELECT DISTINCT a.orderid FROM orders a WHERE a.orderstatus=2 AND DATE(a.ship_dt)='2008-06-26'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm glad it worked for you, MySQL 5 is just more standardized. What's with the grade?
CoyotesIT
CoyotesIT
ASKER