fael097 Posted July 2, 2010 Share Posted July 2, 2010 hi, once i read about a way to store the current date on database (the info 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 Link to comment https://forums.phpfreaks.com/topic/206578-storing-current-date-on-database/ Share on other sites More sharing options...
Pikachu2000 Posted July 2, 2010 Share Posted July 2, 2010 You should store it in a datetime field type. Have a read of the MySQL manual page http://dev.mysql.com/doc/refman/5.0/en/datetime.html for a good explanation. Then you can easily use MySQL's DATE_FORMAT() function to retrieve the date and time in whatever format you'd like. Link to comment https://forums.phpfreaks.com/topic/206578-storing-current-date-on-database/#findComment-1080499 Share on other sites More sharing options...
fael097 Posted July 2, 2010 Author Share Posted July 2, 2010 that helps a lot! thank you Link to comment https://forums.phpfreaks.com/topic/206578-storing-current-date-on-database/#findComment-1080510 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.