def get_datetime(formatted_str, user_fmt=None):
        # type: (AnyStr, Optional[AnyStr]) -> datetime
        """get datetime() object from string formatted %Y-%m-%d %H:%M:%S

        Examples:
            >>> StringClass.get_datetime('2008-11-9')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('2008/11/9')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('20081109')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('11/9/2008')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('11-9-2008')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('11/09/08')
            datetime.datetime(2008, 11, 9, 0, 0)
            >>> StringClass.get_datetime('2008-11-9 11:09')
            datetime.datetime(2008, 11, 9, 11, 9)
            >>> StringClass.get_datetime('2008-11-9 11:09:52')
            datetime.datetime(2008, 11, 9, 11, 9, 52)
        """
        date_fmts = ['%m-%d-%Y', '%Y-%m-%d', '%m-%d-%y', '%y-%m-%d']
        date_fmts += [d.replace('-', '/') for d in date_fmts]
        date_fmts += [d.replace('-', '') for d in date_fmts]
        time_fmts = ['%H:%M', '%H:%M:%S']
        fmts = date_fmts + ['%s %s' % (d, t) for d in date_fmts for t in time_fmts]
        if user_fmt is not None:
            if is_string(user_fmt):
                fmts.insert(0, str(user_fmt))
            elif isinstance(user_fmt, list):
                fmts = user_fmt + fmts
            elif isinstance(user_fmt, tuple):
                for fff in user_fmt:
                    fmts.insert(0, fff)
        flag = False
        for fmt in fmts:
            try:
                org_time = time.strptime(formatted_str, fmt)
                flag = True
                break
            except ValueError:
                pass
        if not flag:
            raise ValueError('The DATETIME must be one of the formats: %s' % ','.join(fmts))
        else:
            return datetime(org_time.tm_year, org_time.tm_mon, org_time.tm_mday,
                            org_time.tm_hour, org_time.tm_min, org_time.tm_sec)