Reputation: 101
I have small problem with my code. I insert DATE to database as "08-01-2016" (Day-Month-Year) and I must compare Current date with data from row.
My SQL code is:
WHERE date_from = DATE_FORMAT(NOW(),'%m-%d-%Y')
But this doesn't work... Anybody can help me build good query to do this ? Thanks!
Upvotes: 0
Views: 17
Reputation: 101
Ohh! Sorry for problem! I don't know why but I write wrong code before :( Good code is:
date_from = DATE_FORMAT(NOW(),'%d-%m-%Y')
Sorry and thanks!
Upvotes: 1