I’m getting the below error when trying to insert a value dynamically from a datatable using foreach into mysqldb.
Below is the query i ‘ve used.
"INSERT INTO INPUT_TABLE (START_DATE) VALUES (STR_TO_DATE(@START_DATE,’%M %d %Y’)"
@Tanuja_Gopalasetti -
pls check the format of @Start_date and change the STR_TO_DATE format accordingly.
Ex: STR_TO_DATE(‘21,5,2013’,‘%d,%m,%Y’);
STR_TO_DATE(‘21-5-2013’,‘%d-%m-%Y’);
format should be ‘%d %m %Y’ or %m %d %Y (small d, small m, and caps Y)