PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hey I am grabbing the date from my database and then displaying it on the screen, however it comes back at 2003-12-07 00:00:00. How do I change that so it displays like 12-07-2003 or 12/07/2003. Thanks
I am using Access right now for the time being... so mySQL functions wont workin the query. Do you have any other thoughts about fomatting it on the page, other than switch to mySQL, which I eventually will do.
Nay wrote:DATE_FORMAT(). You can use that in a query.
In that case, create a function that will do this conversion for you. Use [php_man]explode[/php_man]() to extract each piece of data. And get the date into an array where you can easily control how to print each element.
Sami wrote:In that case, create a function that will do this conversion for you. Use [php_man]explode[/php_man]() to extract each piece of data. And get the date into an array where you can easily control how to print each element.