Query a range of date

Posted by juniorSE on Stack Overflow See other posts from Stack Overflow or by juniorSE
Published on 2010-04-28T02:16:55Z Indexed on 2010/04/28 2:23 UTC
Read the original article Hit count: 340

Filed under:
|

Hello Guys,

Im trying to query a sort of from - to date. e.g. 20-01-2010 to 20-02-2010. this should include the mentioned dates.

i've tried the following queries but none works.

select * from [tableName] where date >= '20-01-2010' AND date <= '20-02-2010'

  • the date where date is equal to 20-02-2010 does not show. i don't know why.

select * from [tableName] where date between '20-01-2010' AND '20-02-2010'

  • the mentioned dates is not included in the results. i want it to be included in the results.

please help. thanks in advance! :)

© Stack Overflow or respective owner

Related posts about sql

Related posts about query