Bisa jadi masalah terkait dengan konversi input coba gunakan str_to_date dan literal Di mana (gunakan konversi format tanggal yang tepat berdasarkan format Anda, contoh saya adalah "%d-%m-%Y")
$modelStockDetails=StockDetails::find()
->where(' date(created) between STR_TO_DATE("'. $start_date . '", "%d-%m-%Y" )
AND STR_TO_DATE("' . $end_date . '", "%d-%m-%Y" )' )
->andwhere(['receiving_order_id' =>$modelRecevingOrder->id,'deleted' => 'N'])->all();
atau untuk menghindari penggunaan var di sql Anda bisa menggunakan
$modelStockDetails=StockDetails::find()
->where(' date(created) between STR_TO_DATE(:start_date, "%d-%m-%Y" )
AND STR_TO_DATE( :end_date, "%d-%m-%Y" )', [':start_date' => $start_date, ':end_date' => $end_date] )
->andwhere(['receiving_order_id' =>$modelRecevingOrder->id,'deleted' => 'N'])->all();