Hi I need to change a uk date dd/mm/yyyy to mysql format yyyy/mm/dd I have a user form where they enter the date in dd/mm/yyyy string format, i want to take that string, and convert it to mysql format yyyy/mm/dd Possible? Ive searched for ages and havent found a solution that works. Is there an easy solution to this? surely there must be Cheers
Date-Time format $date = "2012-02-07 19:02:41"; echo date('Y/m/d', strtotime($date)); PHP: Format for if you use time(); $date = "1328662961"; echo date('Y/m/d', $date); PHP: Hope this helped.
if it's going to be uploaded to SQL database , the database will DATESTAMP or TIMESTAMP it for you as soon as the record is made. or have two separate entry fields for the date they enter and the SQL field for it (the one that gets auto-created) Is it for a D/O/B ? or just for the record and date it was created?