hi,
i have a date/time column. i insert into it using now(). works fine.
now i want a query where data/time is either today or yesterday.
how should i do it?
thanks/erick
__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
its select date_sub(now(),INTERVAL 1 DAY)
- Original Message -
From: Erick Papadakis [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Sent: Wednesday, September 04, 2002 1:25 PM
Subject: problem with date/time column
hi,
i have a date/time column. i insert into it using now(). works
Hi Erick,
i have a date/time column. i insert into it using now(). works fine.
now i want a query where data/time is either today or yesterday.
how should i do it?
Calculate the date required (yesterday and/or today) and then add a time
component of midnight (all zeroes) to make up a
Instead why don't you try
select date_sub(now(), INTERVAL 1 DAY)
Karthik.
- Original Message -
From: DL Neil [EMAIL PROTECTED]
To: Erick Papadakis [EMAIL PROTECTED]; mysql
[EMAIL PROTECTED]
Sent: Wednesday, September 04, 2002 3:09 PM
Subject: Re: problem with date/time column
Hi
]
Sent: Wednesday, September 04, 2002 3:09 PM
Subject: Re: problem with date/time column
Hi Erick,
i have a date/time column. i insert into it using now(). works fine.
now i want a query where data/time is either today or yesterday.
how should i do it?
Calculate the date required
Erick,
Wednesday, September 04, 2002, 10:55:55 AM, you wrote:
EP i have a date/time column. i insert into it using now(). works fine.
EP now i want a query where data/time is either today or yesterday.
EP how should i do it?
Take a look at DATE and TIME functions such as CURDATE(),