Page 1 of 1

Dateformat??????

Posted: Tue Oct 15, 2002 7:48 am
by terji
I have a problem with dateformats. After selecting a date from my database and displaying it, it has the wrong appearence.

My question is: How do I format my date?

This is the date returned by the database after echo: 2002-10-14 00:00:00
I want it to be displayed as: 14-10-2002

How do I format my date???

Posted: Tue Oct 15, 2002 7:52 am
by twigletmac
You can format the date by using MySQL's DATE_FORMAT() function in your SELECT statement:
http://www.mysql.com/doc/en/Date_and_ti ... tions.html

PHP also has functions for playing with dates and times:
http://www.php.net/manual/en/ref.datetime.php

Mac