Date function not working?

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
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Date function not working?

Post by GeXus »

I'm just trying to format a unix time stamp... and this is what I'm getting


Code: Select all

date("F j, Y",'2007-06-03 16:28:30');
Date returned is December 31, 1969

am I missing something here?
User avatar
maliskoleather
Forum Contributor
Posts: 155
Joined: Tue May 15, 2007 2:19 am
Contact:

Post by maliskoleather »

you arent providing a timestamp to the second paramater.

Code: Select all

date("F j, Y",strtotime'2007-06-03 16:28:30'));
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Post Reply