I cannot seem to get the csv file to format the dates to UTC time on import to mysql. Here is my query and if i take out the sql variables and the set statement it imports the information fine but i need the dates to be formatted in utc time.
$query = "
LOAD DATA LOCAL INFILE '".$file."' INTO TABLE instructions
FIELDS TERMINATED BY ','
LINES TERMINATED BY '
'
(route_name,stop_sequence_number,stop_location_id,stop_action,@stop_arrival_time,@stop_departure_time,time_zone);
SET stop_arrival_time = STR_TO_DATE(@stop_arrival_time, '%m/%e/%Y %r');
SET stop_departure_time = STR_TO_DATE(@stop_departure_time, '%m/%e/%Y %r');
";
Am I not using the STR_TO_DATE format correctly? i looked at the information on the format and it said that %m for numbered month, %e for single digit day, %y for four length year and the %r for AM - PM time.