def DateFormatswithDashes():
    """Yield all combinations of valid date formats."""
    from itertools import permutations
    formats = []
    date = '%Y-%m-%d'
    hours = '%H', ''
    minutes = '%M', ''
    seconds = '%S', ''
    for hour in hours:
        for minute in minutes:
            for second in seconds:
                for combo in permutations([second, minute, hour]):
                    time = ':'.join(combo).strip(':')
                    formats.append((date + ' ' + time).strip(' '))
    formats = list(dict.fromkeys(formats))
    formats = sorted(formats, key=len, reverse=True)
    formats = ['%Y-%m-%d %H:%M:%S'] + formats
    return formats
