Change Date Format When Import from Excel

Hello masters,

I have a msyql table like this:
column1:ID (int)
column2:RegDate (date)

My excel RegDate cells look liket this: ‘4/28/2017’

I want to adust the date format to mysql’s standard (yyyy-mm-dd)

I put code in Row_Import event:
$row["RegDate "] =ExecuteScalar(“SELECT STR_TO_DATE(RegDate ,‘%m/%d/%Y’) FROM mytable where ID='” . AdjustSql($row[“ID”]) . “'”);
But I have no luck, after imported, i have blank values for that column.

\

  1. Please help me with the proper way.
  2. What is the function of AdjustSql?

Thanks in advance.

Try:

$row[“RegDate”] = ExecuteScalar("SELECT STR_TO_DATE(RegDate ,‘%m/%d/%Y’) FROM mytable where ID = " . AdjustSql($row[“ID”]));

thanks mobhar for your suggestion
i m trying it later