Why can't you do something along the lines of:
select count(*) from pollResults where dayofyear(now()) =
dayofyear(dateEntered) and year(dateEntered) = 2001;
-----Original Message-----
From: Atle Veka [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 5:51 PM
To: Daren Cotter
Cc: Quentin Bennett; [EMAIL PROTECTED]
Subject: RE: more date problems
On Thu, 1 Mar 2001, Daren Cotter wrote:
> Ok, here goes...
>
> mysql> select member_id, signup_date from members order by member_id desc
> limit 410;
> +-----------+-------------+
> | member_id | signup_date |
> +-----------+-------------+
> (here's the last 20 or so rows)
> | 0120472 | 2001-03-01 |
> | 0120471 | 2001-03-01 |
> | 0120470 | 2001-03-01 |
> | 0120469 | 2001-03-01 |
> | 0120468 | 2001-03-01 |
> | 0120467 | 2001-03-01 |
> | 0120466 | 2001-03-01 |
> | 0120465 | 2001-02-28 |
> | 0120464 | 2001-02-28 |
> | 0120463 | 2001-02-28 |
> | 0120462 | 2001-02-28 |
> | 0120461 | 2001-02-28 |
> | 0120460 | 2001-02-28 |
> | 0120459 | 2001-02-28 |
> | 0120458 | 2001-02-28 |
> +-----------+-------------+
Sorry if I've missed earlier threads about this, but what type is the
signup_date field?
AFAIK, datetime fields should show show the full date (and time) even
though you don't insert it. So it should be '2001-03-01 00:00:00' or
whatever NOW() inserts, if thats what you use :)
Atle
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php