Just another update to what Intrigue25 originally noted. Along with the date function to format a date php also has a very valuable function called strtotime(), you pass it a string of a date formatted in about any way and it will create a time stamp for you. If you use this function for the timestamp parameter of the date function you can reformat just about any date to your desired format with a single line of code. Here is a link to the php page if you would like to find out more:
php.net/strtotime