BUG: Bug in conversion of a string types to a DatetimeIndex with a specifed frequency (GH6273)

closes #6273
closes #6274