You can do:
SET @dt = '2016-07-18';
SELECT * FROM `arrival` WHERE `created_at` >= DATE_FORMAT(@dt ,'%Y-%m-01') AND `created_at` < @dt;
the DATE_FORMAT()
will output the first day of the month 2016-07-01
, since you don't want to include the last day you cannot use the BETWEEN ... AND
statement.
More info: