zrweber Posted January 13, 2011 Share Posted January 13, 2011 Alright, I have a Datetime field in my database which I'm trying to store information in. Here is my code to get my Datetime, however it's returning to me the wrong date. It's returning: 1969-12-31 19:00:00 $mysqldate = date( 'Y-m-d H:i:s', $phpdate ); $phpdate = strtotime( $mysqldate ); echo $mysqldate; Is there something wrong with it? Quote Link to comment Share on other sites More sharing options...
revraz Posted January 13, 2011 Share Posted January 13, 2011 What does the date look like in the table itself? Looks like it's returning 0. Also, how are you getting $phpdate? Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted January 13, 2011 Share Posted January 13, 2011 what is the original value of $phpdate when you first use it, thats where its taking the time and date from try and echo $phpdate first and see what you get Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.