Portal Home > Knowledgebase > Articles Database > MySql date field


MySql date field




Posted by hostaq, 12-12-2011, 12:57 AM
I have a mysql db, where in a date filed the value 1417842000 is representing to 6/Dec/2014. I want to fill this field with a number that will be equal to 6/Dec/2024 Please assist me

Posted by 8088, 12-12-2011, 01:29 AM
2024 - 2014 = 10 years = 520 weeks = 3640 days = 87360 hours = 5241600 minutes = 314496000 seconds That doesn't take leap years into account. I'll leave the rest to you. http://dev.mysql.com/doc/refman/5.5/en/datetime.html <- much more convenient in my humble opinion.

Posted by RoseHosting, 12-12-2011, 08:46 AM
You can use MySQL's DATE_ADD:



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Vmware on cPanel (Views: 591)