Originally Posted by Fou-Lu
Well, since you don't mention which of these it is all I can give is an example. dd-mm-yyyy is valid in php for a date format: http://ca1.php.net/manual/en/datetime.formats.date.php
so you can use it in strtotime or dateTime classes.
$sDate = '02-02-2012';
$dt = new DateTime($sDate);
print $dt->format('Y-m-d'); // 2012-02-02
You'll want to look into database security or prepared statements as well.
Dont mind can you be more specific with example code I have posted .......I am a beginner and trying to understand a lot but it became tuff for me
.... so please help me.
In the above code I have created a frontend form for the Creation_Date & Resolved_Date which takes dd-mm-yyyy but when i am posting it should post to database as yyyy-mm-dd..