Reputation: 33223
I want to query on sql (mysql) based on the date.
Something like:
Select * from table_name where e_date > 2001-12-30;
What is the right query?
I am not able to pen down my problem and get the right response from google.
Upvotes: 0
Views: 77
Reputation: 6130
Just add closing quotes on your date.
Select * from table_name where e_date > '2001-12-30'
Check the link below:
Date and Time Functions in MYsQL
This Site will help you out regarding date time functions
Regards
Upvotes: 2
Reputation: 263703
try this:
Select *
from table_name
where e_date > DATE('2001-12-30');
Upvotes: 1
Reputation: 6584
That's correct, you'll need to put the date around single quotes though.
Upvotes: 3