Display date format

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!

Moderator: General Moderators

Post Reply
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Display date format

Post by S_henry »

Hi guys..
If i just display data from table, it will be displayed as '2007-02-25 00:00:00'. How can i display that data by the format of '25.02.2007'?

Thanks..
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: Display date format

Post by volka »

Hi. Please be more specific.
S_henry wrote:If i just display data from table
A html table? Database table? Dinner table?
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Sorry..i mean if i just extract the data from mysql database, that data will be displayed as '2007-02-25 00:00:00' in html. In mysql table, the field type is 'datetime'. So how can i display that data by the format of '25.02.2007' in html?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You might be interested in DATE_FORMAT(date,format) at http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

OK. Solved already. Thank you. :D
Post Reply