strange DATE() problem

This is a discussion on strange DATE() problem within the MySQL Database forums, part of the Database Forums category; Hi, I encountered strange BUG here in mysql server Someone see that before? old server: mysql> SELECT count(*) AS ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-10-2007
ts
 
Posts: n/a
Default strange DATE() problem

Hi,

I encountered strange BUG here in mysql server
Someone see that before?

old server:
mysql> SELECT count(*) AS count_all FROM leads WHERE (imported_at
BETWEEN '2007-11-09' AND '2007-11-10');
+-----------+
| count_all |
+-----------+
| 2276 |
+-----------+
1 row in set (0.56 sec)

mysql> SELECT count(*) AS count_all FROM leads WHERE
(DATE(imported_at) BETWEEN '2007-11-09' AND '2007-11-10');
+-----------+
| count_all |
+-----------+
| 2276 |
+-----------+
1 row in set (0.80 sec)

new server:
mysql> SELECT count(*) AS count_all FROM leads WHERE (imported_at
BETWEEN '2007-11-09' AND '2007-11-10');
+-----------+
| count_all |
+-----------+
| 2276 |
+-----------+
1 row in set (0.42 sec)

mysql> SELECT count(*) AS count_all FROM leads WHERE
(DATE(imported_at) BETWEEN '2007-11-09' AND '2007-11-10');
+-----------+
| count_all |
+-----------+
| 0 |
+-----------+
1 row in set (0.39 sec)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0