php日期转换mysql [重复]

Possible Duplicate:
Managing date formats differences between PHP and MySQL

I am using jQuery ui datepicker

and initialized with following format

$("#task_date").datepicker({dateFormat : "m/d/y",
            showOn: "button",
            buttonImage: "<?= base_url(); ?>assets/img/calendar.png",
            buttonImageOnly: true
        });

so the date format is in "m/d/y" ,how can i convert it to mysql date format ?

also i need to convert from mysql date format to "m/d/y" ...

Change dateFormat : "m/d/y" to

dateFormat : "yy-mm-dd"    //Which is same as PHP's 'Y-m-d' or '2012-07-14'

And, for converting to m/d/y format(in jQuery), you'll need to do:

var date = $('#task_date').datepicker({ dateFormat: 'dd-mm-yy' }).val();

Date conversion(in jQuery and in PHP)