Depending on your database engine (which you didn't mention in your
post), some allow you to format the date however you want it as you pull
it out of the database in your sql query.  I always find this to be the
easiest way to do it.  That way you don't have to worry about formatting
the data after it has been output from your query.

HTH!

--Sam



Matthew Oatham wrote:
> Hi,
> 
> You might already be fed up with my posts but I'm a complete PHP
> newbie and find these groups are the best way to learn! Anyway I have
> the database date in the format: yyyy-mm-dd hh:mm:ss e.g. 2004-02-24
> 07:57:59 but when in some situations I only want to show the user the
> date in the format dd-mm-yyyy what is the correct / best php function
> to use for this purpose ?     
> 
> Cheers.
> 
> Matt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to