Pedro's blog: db2, mysql, php, linux and performance

DB2, the date and PHP
04/02/2010, 18:58
Filed under: General | Tags: , , , ,

Here comes the trick:

The common format when I get a date row from the db2 database is:

echo $date; //gets 2010-02-04 18:21:42

How did I make the magic with php:

$date        = strftime(“%d/%m/%Y”, strtotime($date));

echo $date; //gets 04/02/2010


No Comments so far
Leave a comment

Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

¡IMPORTANTE! Responde a la pregunta: ¿Cuál es el valor de 6 9 ?