Andy,
Assuming you have not made a mistake in reading 02:53:32 as afternoon, when in fact it 
appears to have been
early-morning; is there a problem with the code that INSERTs the data in 12-hour 
instead of 24-hour format?
=dn

----- Original Message -----
From: "Ken Kinder" <[EMAIL PROTECTED]>
To: "Andy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 20 November 2001 15:47
Subject: Re: 24 hour query confusion....


> 3076 is 2:53 in the morning, not the afternoon.
>
> On Tuesday 20 November 2001 08:46 am, Andy wrote:
> > Summary
> > If I have a filed of type "DATETIME" in a table and do a query with an
> > order on that field than records with a datetime in the afternoon are
> > returned before articles in the morning.
> >
> > EG:
> > mysql> select pubtime,articleid,headline from articles where  articleid
> > mysql> >3050 order by pubtime;
> >
> > will return:
> > | 2001-11-20 02:53:32 |      3076 | "Simpsons" collections coming next year
> > | 2001-11-20 10:02:06 |      3073 | Pearl Harbor
> > | 2001-11-20 11:05:45 |      3074 | Simpsons season 2 at the BBFC ?
> > | 2001-11-20 12:15:02 |      3075 | Paramount announce "Down to Earth"
> >
> > Note articleid 3076 is timestamped 02 in the afternoon.  Article 3075 is
> > 12:15 noon.  Clearly article 3076 should come after 3075.
> >
> > Can I set the select query to deal with the order by 24 hour clock or am I
> > missing something big time here !
> >
> > Andy C
> > Editor R2 project
> > http://www.r2-dvd.org
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


---------------------------------------------------------------------
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

Reply via email to