range of datetime data type (show all records in between 2 dates. example: form
2008/10/01 to 2008./12/12). thanks
forzadraco
0
Junior Poster in Training
Recommended Answers
Jump to PostSELECT * FROM date BETWEEN '2008-10-01' AND '2008-12-12'
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between
Jump to PostIf the data type is datetime, then you must include time in the query
SELECT * FROM table where date_col BETWEEN '2008-10-01 00-00-00' AND '2008-12-12 23:59:59'
All 6 Replies
marrrrrrc
0
Newbie Poster
mwasif
10
Posting Whiz
Matthewanxa
0
Newbie Poster
Shanti C
106
Posting Virtuoso
Matthewanxa
0
Newbie Poster
Shanti C
106
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.