I have a date I need to store in a date field in mysql. My string is in the following format:
24/02/2011
While it needs to get into the database as:
2011-02-24
I thought I would be able to do it like so in the sql query
STR_TO_DATE('.$_POST['start_date'].', \'%d,%m,%Y\')
But it doesn’t like it.
Is there another method?
1 Answer