Youcould also try CASTing
(http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html) the data
Bastien
From: <[EMAIL PROTECTED]>
To:
CC: <[EMAIL PROTECTED]>
Subject: Re: [PHP-DB] MySQL date casting..
Date: Tue, 17 Jan 2006 12:51:44 -0500
Ahh! Thank you Philip! That's w
Ahh! Thank you Philip! That's what I was looking for! I see what I did wrong
now.
I was using the date format strings wrong. I was using it like I'd use it for
DATE_FORMAT() instead of as an input filter.
This is what I was trying to do:
select STR_TO_DATE('2003-11-05 06:00 PM', '%Y-%m-%d %H
= =
Could you not just add:
ORDER BY ApptDate, ApptTime
To the end of your SQL - this will order the set by date then time. You can
also add ASC or DESC for Ascending or Dscending as desired.
N.B. the ORDER BY statement must be the last part of you query!
-Original Message-----
From: [
Forgive me that this isn't really PHP related, but solely MySQL.. but
the MySQL mailing lists drive me nuts and figured someone here would
have a quick answer.
I'm trying to sort by a date and time field(s) (two separate fields).
It's a dumb system but until we do the next revision, it's going
Forgive me that this isn't really PHP related, but solely MySQL.. but the MySQL
mailing lists drive me nuts and figured someone here would have a quick answer.
I'm trying to sort by a date and time field(s) (two separate fields). It's a
dumb system but until we do the next revision, it's going