Parse a string according to the MS SQL date format
(dateString)
| 3103 | _mssql_date_re = \ |
| 3104 | re.compile('(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})(\.\d+)?') |
| 3105 | def _parse_date_mssql(dateString): |
| 3106 | '''Parse a string according to the MS SQL date format''' |
| 3107 | m = _mssql_date_re.match(dateString) |
| 3108 | if not m: return |
| 3109 | w3dtfdate = '%(year)s-%(month)s-%(day)sT%(hour)s:%(minute)s:%(second)s%(zonediff)s' % \ |
| 3110 | {'year': m.group(1), 'month': m.group(2), 'day': m.group(3),\ |
| 3111 | 'hour': m.group(4), 'minute': m.group(5), 'second': m.group(6),\ |
| 3112 | 'zonediff': '+09:00'} |
| 3113 | if _debug: sys.stderr.write('MS SQL date parsed as: %s\n' % w3dtfdate) |
| 3114 | return _parse_date_w3dtf(w3dtfdate) |
| 3115 | registerDateHandler(_parse_date_mssql) |
| 3116 | |
| 3117 | # Unicode strings for Greek date strings |
nothing calls this directly
no test coverage detected