Answer the question
In order to leave comments, you need to log in
How to convert date in sql query?
The table has a date field, which contains the date in the following format: 05.10.18, 22:00. I need to compare the current date (including minutes) NOW() and the date specified in the date cell in the query. To do this, I write:
WHERE NOW () < date. However, nothing comes out, and, as I understand it, due to the fact that the date is in this format. If we substitute WHERE NOW() < '2018-03-08', then everything works.
Tried to use CONVERT and CAST, didn't work. Tell me how to do it right.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question