I have a form with a bunch of date fields (among others: name, address, etc)...
each date field accepts the date in the format mm/dd...
All the information on the form is saved to a DB...
My save (submit) feature works great except for the dates. Beacuse the format does not match the yyyy-mm-dd format. Currently dates are always stored as 0000-00-00.
Is there a way to format the date in the insert statement so that it can be stored properly in the DB?
Also, since the user cannot enter the year I would like to have the current year to be automatically entered. Is this possible?
I believe STR_TO_DATE is the answer, however I don't have anything working at the moment.
Thanks
atsea
each date field accepts the date in the format mm/dd...
All the information on the form is saved to a DB...
My save (submit) feature works great except for the dates. Beacuse the format does not match the yyyy-mm-dd format. Currently dates are always stored as 0000-00-00.
Is there a way to format the date in the insert statement so that it can be stored properly in the DB?
Also, since the user cannot enter the year I would like to have the current year to be automatically entered. Is this possible?
I believe STR_TO_DATE is the answer, however I don't have anything working at the moment.
Thanks
atsea