BUG: Bug in to_datetime when format='%Y%m%d and coerce=True are specified (GH7930)

closes #7930