Page 1 of 1

storing current date on database

Posted: Fri Jul 02, 2010 5:13 pm
by fael097
hi, once i read about a way to store the current date on database (the value on DB looked like "1267980827"), so you could retrieve this numbers with the date() function, and it would return the full format date.
what should i insert on my database to store this kind of value? thanks

Re: storing current date on database

Posted: Fri Jul 02, 2010 5:53 pm
by Jonah Bron
That column would be type Int. To INSERT that value into the table, use the value returned by time().

Re: storing current date on database

Posted: Fri Jul 02, 2010 6:24 pm
by fael097
that helps a lot!
thank you! :D