|
Home > Archive > MySQL Server Forum > June 2005 > Current Month
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| How do you get the current month - 1 month?
(so not a particular day, but the whole month)
Thanks,
Gary
| |
|
|
|
|
|
| Great, thanks, follow-up question, how can it apply to a column which isn't
called month? i.e. I want to view the records in column A where the month is
month-1
"Chris Hope" < blackhole@electricto
olbox.com> wrote in message
news:d82dqr$mr6$1@lu
st.ihug.co.nz...
> Gary wrote:
>
>
> SELECT MONTH(SUBDATE(NOW(),
INTERVAL 1 MONTH))
>
> The date and time functions can be found in the manual here:
> http://dev.mysql.com/doc/mysql/en/d...-functions.html
>
> --
> Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
| |
|
| Never mind, the link below answered it, thanks for your help!
"Gary" <gary@aviatorwebsite.com> wrote in message
news:%g3pe.101730$w15.78455@tornado.tampabay.rr.com...
> Great, thanks, follow-up question, how can it apply to a column which
> isn't called month? i.e. I want to view the records in column A where the
> month is month-1
> "Chris Hope" < blackhole@electricto
olbox.com> wrote in message
> news:d82dqr$mr6$1@lu
st.ihug.co.nz...
>
>
|
|
|
|
|