When I'm using following code to get my date in European format (dd-mm-yyyy), my records get messed up. They are sorted mathematically (or alphabetically if you wish) instead of chronically.
E.g. :
12-09-2002
31-10-2001
29-02-1998
this would be the normal order, but instead, the following happens to me:
31-10-2001
29-02-1998
12-09-2002
...
Code:
<?php
$nieuw_SQL = "SELECT nieuw_header,date_format(nieuw_date,'%d-%m-%Y') as
nieuw_date FROM nieuw ORDER BY nieuw_date DESC LIMIT 5";
$nieuw_result = mysql_query($nieuw_SQL);
while($nieuw = mysql_fetch_array($nieuw_result)) {
echo $nieuw['nieuw_date'];
?>
<?php
echo $nieuw['nieuw_header'] ?>
<br>
<?php
}
?>
Does anyone have a solution? Thanks in advance!