0

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.

1
  • What exactly do you want to do with this query? It seems to be correct with quotes. Commented Mar 1, 2012 at 0:09

3 Answers 3

3

That's correct, you'll need to put the date around single quotes though.

Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

1

try this:

Select * 
from table_name 
where e_date > DATE('2001-12-30');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.