Code Snippet: Date converter

Posted on October 16, 2007
Filed Under Code Snippets |

Snippet: Date converter

Description:

This tiny piece of code takes care that you can display a standard date instead of the mysql date (2005-02-23)

Example:
echo date(”d m Y”, “2005-02-23″);

Shows:
23 02 2005

Code:
PHP:


<?php//Shows a neat time from the PHP Default date (YYYY-MM-DD)
echo date(“d m Y”, strtotime($db_time));

?>

Comments

Your Ad Here

Leave a Reply