Jump to content

Date Problem In Php?


adilmarwat
 Share

Recommended Posts

I have prove the query to the mysql table as UPDATE info SET date_retire = date_retire+ 00600000;which set the data of retirement of emplyees.When i display the date_retire field on php page it give the wrong result as 01-01-1970 for each record on employee. How can i achieve the desired date from field. please help in this regard. Adil

Link to comment
Share on other sites

I have mysql table name info contain field "date_retire(date)"I enter the query as "UPDATE info SET date_retire = date_retire + 00600000"means that I have to add 60 years with date_retire field. which gives result like that 01-01-2070 if it was 01-01-2010. But when I display the date_retire field on php page it gives 01-01-1970 instead of 01-01-2070.How I solve the problem, please help me. Adil

Link to comment
Share on other sites

What type of field is the date_retire field? A date of 1-1-70 usually means that the date is empty, so if you've looked in the database and verified that the correct numbers are stored there, then the problem would be with the code that displays the dates.

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...