<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-375697951860081841.post8936265342332920355..comments</id><updated>2008-04-03T18:10:01.160+01:00</updated><category term='linux'/><category term='idea'/><category term='business'/><category term='Microsoft'/><category term='MySQL'/><category term='Programming Lanugage'/><category term='SQL'/><category term='ETL'/><category term='Email'/><category term='China'/><category term='pentaho'/><category term='informatica'/><category term='Jobs'/><category term='MS SQL'/><category term='open source'/><category term='federated tables'/><category term='Oracle'/><category term='data warehousing'/><category term='Google'/><category term='triggers'/><category term='decision tables'/><category term='PHP'/><category term='Views'/><category term='configuration-management'/><category term='event-driven publishing'/><category term='Data'/><category term='talend'/><category term='Agile'/><category term='business rules'/><category term='Decision tree'/><category term='ubuntu'/><category term='caching'/><category term='Data mining'/><category term='expert system'/><category term='database'/><category term='Excel'/><title type='text'>Comments on Jonathan Levin's Axioms: Searching Problems with Dates and Midnight</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/8936265342332920355/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/8936265342332920355/comments/default'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2008/04/searching-problems-with-dates-and.html'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/__8lgzcJRF8U/SOAxOE9FX9I/AAAAAAAAIf0/gzlxBGxU_gU/S220/mesmiling_cv.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-491891967219853264</id><published>2008-04-03T18:10:00.000+01:00</published><updated>2008-04-03T18:10:00.000+01:00</updated><title type='text'>&lt;i&gt;Now, for some magical reason, if you hide the t...</title><content type='html'>&lt;I&gt;Now, for some magical reason, if you hide the time in the date in your searches, like so:&lt;BR/&gt;&lt;BR/&gt;    where signupdate between '2008-01-01' and '2008-01-02'&lt;BR/&gt;    or&lt;BR/&gt;    where signupdate between date('2008-01-01 00:00:00') and date('2008-01-02 00:00:00')&lt;BR/&gt;&lt;BR/&gt;then you might not see all the data between the days 01 to 02.&lt;/I&gt;&lt;BR/&gt;&lt;BR/&gt;It's not a magical reason -- if you don't specify the time, the time becomes "00:00:00".  This includes implicit conversions, like when you compare a date to a datetime or timestamp.&lt;BR/&gt;&lt;BR/&gt;I'd suggest you use "date" when you mean "date" and "time" when you mean "time".  "signupdate" is misleading, sounds like it's a date only when it's really a time.&lt;BR/&gt;&lt;BR/&gt;If you have a query that specifies "WHERE datetime_col BETWEEN '2008-01-01' and '2008-01-02'" then the implicit conversion is:&lt;BR/&gt;&lt;BR/&gt;"WHERE datetime_col BETWEEN '2008-01-01 00:00:00' and '2008-01-02 00:00:00'"&lt;BR/&gt;&lt;BR/&gt;Which is why you don't get all the dates you wanted.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/8936265342332920355/comments/default/491891967219853264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/8936265342332920355/comments/default/491891967219853264'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2008/04/searching-problems-with-dates-and.html?showComment=1207242600000#c491891967219853264' title=''/><author><name>Sheeri K. Cabral</name><uri>http://www.blogger.com/profile/13990877688502800403</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.jonathanlevin.co.uk/2008/04/searching-problems-with-dates-and.html' ref='tag:blogger.com,1999:blog-375697951860081841.post-8936265342332920355' source='http://www.blogger.com/feeds/375697951860081841/posts/default/8936265342332920355' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-592593505'/></entry></feed>
