Convert MySQL date to Month and Day

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
crimius
Forum Commoner
Posts: 28
Joined: Sun Oct 13, 2002 6:02 pm
Location: Austin, Texas
Contact:

Convert MySQL date to Month and Day

Post by crimius »

I have retreived a date from a MySQL database such as 1993-06-01.

I want to take that value and convert it with PHP to: June, 1993.

I am sure this is simple but am having trouble finding the right function.

Thanks in advance,
-Craig
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Post by Jade »

User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

Read the date function part of the manual, and also check out how i helped here:

http://www.devnetwork.net/forums/viewtopic.php?t=6728
crimius
Forum Commoner
Posts: 28
Joined: Sun Oct 13, 2002 6:02 pm
Location: Austin, Texas
Contact:

Post by crimius »

Thanks yall!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

MySQL can also do this (and it'll save PHP having to do the work). Check out the DATE_FORMAT() function:
http://www.mysql.com/doc/en/Date_and_ti ... tions.html

Mac
Post Reply