|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hello,
I have a mysql field with a timestamp field. I'm using php to display it and it prints like "000815" My question is: Is there a way to make this display more friendly, ie: August 15, 2000 Thanks for your help! |
|
#2
|
|||
|
|||
|
Use the DATE_FORMAT function. To get a date formatted how you want:
select DATE_FORMAT( date_column, '%M %e, %Y' ) from mytable; |
|
#3
|
|||
|
|||
|
Oh, URL to details about date functions:
http://www.mysql.com/documentation/..._time_functions |
|
#4
|
|||
|
|||
|
Thank you.
Is this format: select DATE_FORMAT( date_column, '%M %e, %Y' ) from mytable; usable in php? |
|
#5
|
|||
|
|||
|
You use it just like any other mysql query:
$result=mysql_query("foo"); |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > making mysql timestamp look friendly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|