Mysql change date format mm/dd/yy into yyyy-mm-dd -
hi can help me how can alter mm/dd/yy yyyy-mm-dd in mysql?
my date table in varchar when import csv, can re-create date in csv in mm/dd/yy , aug. 1, 1992, want both format in yyyy-mm-dd. thanks.
user mysql date column datetime , @ time of importing csv utilize script alter format
<?php $csvformat = $variabletostorecvsformat; $csvtimestamp = strtotime($csvformat); $mysqlcompatibleformat = date(y-m-d,$csvtimestamp ); ?>
now insert varibale database
mysql
No comments:
Post a Comment