0

What am I doing wrong?
I've stored the date in american format (yyyy-mm-dd) and want to output it in european format (dd-mm-yyy).

This is my code.

//ZENDING
$result = mysql_query("select ID, Bestemming, Afkorting, Datum FROM Zendingen WHERE ID ='" . $znding . "' ORDER BY ID, Bestemming ASC") OR DIE ( mysql_error() ); 

while($row = mysql_fetch_array($result))
  {
  $datumzending = $row['Datum'];
  echo $row['Bestemming'];
  echo date("Y-m-d",$datumzending); 
  echo "<br />";
  echo "<br />";
  }

Thanks in advance!

2
Contributors
6
Replies
8
Views
5 Years
Discussion Span
Last Post by Stickie
0

the problem is that it always shows up as 1-1-1970, why is that?

0

Then it was not inserted correctly (NULL). It is a date column ?

Yes it is...
Weird thing :( any info you need?

0

Can you give an example of your insert query ?

The input should be fine. It is a custom made table like thing which i handed out to someone else.
it inputs the data fine.

BTW: Solved

It called for the wrong attribute ;) Sorry for wasting your time!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.