Hello,
I'm a newbie in MySQL. I have a table that contains column 'startdate
[date]' and 'enddate [date]'. Somehow, I have to execute SQL that search
any entry that corresponds to the current year and current month, e.g.:
"SELECT * FROM mytable WHERE fieldx = '123' AND (startdate LIKE
'2004-01-%' || enddate LIKE '2004-01-%') ORDER BY id"
This SQL works with any entry that has startdate like '2004-01-02' and
enddate like '2004-01-30'.
Now, how do I modify my SQL so I can also retrieve any entry that has
startdate < '2004-01-%' and enddate > '2004-01-%' ?
Much obliged,
andy
- Date Manipulation S Aravind
- RE: Date Manipulation Al Caponi
- Re: Date Manipulation Stewart G.
- Date Manipulation Victoria Reznichenko
- Re: DATE Manipulation Andy Prasetya
- Re: DATE Manipulation Chris W
- Re: DATE Manipulation Vinay