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

closes #6273