rcouser Posted December 18, 2008 Share Posted December 18, 2008 Hi previously I would use timestamp as dates in MySQL because they automatically insert and update but now I need a way to insert specific date for an event with datetime but don't no how to do this with php. I was thinking maybe three inputs for day month year Any help would be great, Cheers Link to comment https://forums.phpfreaks.com/topic/137514-best-way-to-insert-dates-into-mysql-for-events/ Share on other sites More sharing options...
phpian Posted December 18, 2008 Share Posted December 18, 2008 to insert a datetime into a field it should be in this format: YYYY-MM-DD HH:MM:SS how you get the values is up to you. textbox, selects, js datepickers, etc... php date() function will help you to format dates and time if you need to. Link to comment https://forums.phpfreaks.com/topic/137514-best-way-to-insert-dates-into-mysql-for-events/#findComment-718609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.