d3v4 — 2011-03-11T11:16:49-05:00 — #1
Suppose that value1 and value2 are dates, and that date is a date field in the database. This query:
WHERE date BETWEEN value1 and value2
returns all the rows where the date field is between value1 and value2.
What if I want to return all the rows where the date field goes just from value1 or just to value2? Is this possible using BETWEEN?
scallioxtx — 2011-03-11T11:21:56-05:00 — #2
Could you give an example of what you mean? The way you've described is kinda vague tbh.
d3v4 — 2011-03-11T11:24:26-05:00 — #3
Yes, I though so
I mean, I want to find all the rows that have a date that goes from "March 13th 2011" on, with no upper limit.
scallioxtx — 2011-03-11T11:30:12-05:00 — #4
The normal comparison operators work on dates to in MySQL, so you can just use
WHERE date > value
WHERE date >= value if you want to include
d3v4 — 2011-03-11T11:32:39-05:00 — #5
Awesome, thank you very much!