Jump to content

Best way to insert dates into MySQL for events


rcouser

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.