Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP MYSQL Date problem

Status
Not open for further replies.

rninja

Technical User
Apr 11, 2001
381
US
I keep having an issue with the date being spit out to PHP pages. The date is always set to "31 Dec 1969". No matter what I try to do, I always get that date even though UNIX time is set properly.

Does anyone know what this is or how to fix it?

using PHP/4.3.1 and 4.0.12

I appreciate help in this matter.

Rninja

smlogo.gif

 
can i have ur code?

Known is handfull, Unknown is worldfull
 
Simply use the time() function which returns the UNIX timestamp INT(11) - I always use this to store date-time values... there are other PHP functions which can take this timestamp as argument and eg. format the date output for you...

But you should write the code you are using - without it we can't help you...
 
You need to to give us a bit more precise information:
1. How is the column defined in the table?
2. What is the SQL query you use to retrieve it?
3. How do you output the retrieved value?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top