Answer the question
In order to leave comments, you need to log in
How to get only date from DATETIME mysql?
Hello, please tell me, something is not working the request, I need to get the date without time from the database and compare it with the current date on the server, I make the following request
SELECT DATE(`registration_date`) FROM `class_users` WHERE `registration_date` = '2020-02-26' AND `id` = '7260'
Answer the question
In order to leave comments, you need to log in
SELECT DATE(`registration_date`) FROM `class_users`
WHERE DATE(`registration_date`) = '2020-02-26' AND `id` = '7260'
SELECT DATE(`registration_date`) FROM `class_users`
WHERE `registration_date` LIKE '2020-02-26%' AND `id` = '7260'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question