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???
Dateformat??????
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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
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