grKumaran wrote:
Hello Folks,
It is great help. Thank you all and specially for Michael and Shawn. It
does work properly in 4.1.9-max. But I think, LAST_DAY function does not
availble in old MySQL version 4.0.??, so there I have problem, actually our
webserver is still in that version. So I
Dobromir Velev wrote:
Hi,
The following query will probably work but I think it will be easier to pass
the minimum date from your application.
SELECT * FROM t WHERE (year(dt)=year(Now()) and dt(year(dt)=year(Now())-1 and month(dt)>month(Now()))
Also you might want to check the other Date and
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote on 10/18/2005 12:01:50 PM:
- Original Message -
From: "grKumaran" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, October 18, 2005 16:08
Subject: query help
: Hello,
:
: CREATE TABLE t (
: dt datetime
: )
:
: Please assume this is the table st
: > : Hello,
: > :
: > : CREATE TABLE t (
: > : dt datetime
: > : )
: > :
: > : Please assume this is the table structure and contains thousands of
: > records.
: > : And I want to list them only last 12 months (that mean last 1 year)
: > records
: > : exactly.
: > :
: > : For that I tried using th
Hi,
The following query will probably work but I think it will be easier to pass
the minimum date from your application.
SELECT * FROM t WHERE (year(dt)=year(Now()) and dtmonth(Now()))
Also you might want to check the other Date and Time functions
http://dev.mysql.com/doc/refman/4.1/en/date-and
[EMAIL PROTECTED] wrote on 10/18/2005 12:01:50 PM:
> - Original Message -
> From: "grKumaran" <[EMAIL PROTECTED]>
> To:
> Sent: Tuesday, October 18, 2005 16:08
> Subject: query help
>
>
> : Hello,
> :
> : CREATE TABLE t (
> : dt datetime
> : )
> :
> : Please assume this is the table str