Jump to content

Taking a date from MySQL to PHP - "31st December 1969"


FrostbiteXIII
 Share

Recommended Posts

So I have my DB set up, all the other columns are working fine, but my date keeps coming up as December 1969!Can anyone help?

$headlines = MYSQL_QUERY("SELECT NewsTitle, UniqueID, NewsDate, NewsText FROM $table ORDER BY NewsDate DESC");while($headlineData = mysql_fetch_row($headlines)){ 	$newsTitle = $headlineData[0];	$newsID = $headlineData[1];	$newsDate = date('jS F Y', $headlineData[2]);...

It doesnt crash or anything, and I have tried changing the date format in MySQL to all of TIMESTAMP, DATE and DATETIME, but no luck!EDIT: If it helps, it is currently set to TIMESTAMP with the data '2007-05-11 02:50:33'.Link: http://www.mahalfc.com/news.phpAny suggestions?Bob

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...