Page 1 of 1

date formatting Issue

Posted: Sun Dec 07, 2003 9:55 pm
by ericsodt
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

Posted: Sun Dec 07, 2003 10:22 pm
by Nay
DATE_FORMAT(). You can use that in a query.

-Nay

Posted: Sun Dec 07, 2003 10:27 pm
by ericsodt
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.

-Nay

Posted: Sun Dec 07, 2003 11:54 pm
by m3mn0n
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.

Posted: Mon Dec 08, 2003 9:18 am
by ericsodt
Done, thanks :D
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.