one of the times i used the DATE FORMAT function i was then unable to sort by the date?
is this a normal side effect or was there something wrong in my script?
Sorting when DATE_FORMAT() is used
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
The nicedate is there as... I guess like a variable where the DATE_FORMAT is stored. That way, someone could do
and then get it back by a
Code: Select all
DATE_FORMAT( `input_date` , '%c-%e-%y' ) AS rev_dateCode: Select all
while($row = mysql_fetch_array($theQuery)){
echo $row['rev_date'];
}