[RESOLVED] Convert date from one format to another

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
rehandalal
Forum Newbie
Posts: 10
Joined: Mon Sep 18, 2006 3:44 am
Location: Mumbai, India

[RESOLVED] Convert date from one format to another

Post by rehandalal »

Hi,

I have a number of dates stored in my mySQL database which are all of the format (Y-m-d).
eg: 2006-06-28

However when I show them on some PHP pages I wish to show them in the format (' jS F, Y ')
eg: 28th June, 2006

How would I go about doing this???

Thanks!

Rehan

[Edit: nevermind... got this working using strtodate()]
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

combine strtotime() with date() and there you have it...
Post Reply