List:General Discussion« Previous MessageNext Message »
From:Lucky Wijaya Date:February 1 2010 2:23pm
Subject:Re: Selecting Dates
View as plain text  
Just trying to help.

SELECT * FROM orders WHERE order_date BETWEEN '2010-01-01' AND 
'2010-01-30' ORDER BY order_date;

or

SELECT * FROM orders 
WHERE order_date >= '2010-01-01' AND <= '2010-01-30' ORDER BY 
order_date;





________________________________
From: ML <mailinglists@stripped>
To: mysql@stripped
Sent: Mon, February 1, 2010 8:35:01 AM
Subject: Selecting Dates

Hi All,

Switching from Oracle to MySQL, I seem to be having some difficulty selecting dates using
between or even where >= and <= like:

SELECT * FROM orders WHERE order_date BETWEEN='2010-01-01' AND '2010-01-30' ORDER BY
order_date;

or

SELECT * FROM orders WHERE order_date =>'2010-01-01' AND <= '2010-01-30' ORDER BY
order_date;

Neither of these work.

What am I missing?

-ML

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1


      
Thread
Selecting DatesML1 Feb
  • Re: Selecting DatesLucky Wijaya1 Feb
  • Re: Selecting DatesPaul DuBois4 Feb
Re: Selecting Datessureshkumarilu1 Feb
Re: Selecting DatesJim Lyons1 Feb
  • Re: Selecting DatesML1 Feb