title: OverflowError: signed integer is greater than maximum when parsing date in python
body: <p>When attempting to parse a numerically formatted date:</p>
  
  <pre><code>s ="2506181306"
  </code></pre>
  
  <p>using the appropriate date format:</p>
  
  <pre><code>DateFormat = '%d%m%H%M%S'
  dateutil.parser.parse(s).strftime(DateFormat)
  </code></pre>
  
  <p>We end up with an <em>"integer greater than maximum"</em> error:</p>
  
  <pre><code>In [15]:     dateutil.parser.parse(s).strftime(DateFormat)
  ---------------------------------------------------------------------------
  OverflowError                             Traceback (most recent call last)
  &lt;ipython-input-15-9eead825f5c9&gt; in &lt;module&gt;()
  ----&gt; 1 dateutil.parser.parse(s).strftime(DateFormat)
  
  /usr/local/lib/python2.7/site-packages/dateutil/parser.pyc in parse(timestr, parserinfo, **kwargs)
     1006         return parser(parserinfo).parse(timestr, **kwargs)
     1007     else:
  -&gt; 1008         return DEFAULTPARSER.parse(timestr, **kwargs)
     1009
     1010
  
  /usr/local/lib/python2.7/site-packages/dateutil/parser.pyc in parse(self, timestr, default, ignoretz, tzinfos, **kwargs)
      402                 repl[attr] = value
      403
  --&gt; 404         ret = default.replace(**repl)
      405
      406         if res.weekday is not None and not res.day:
  
  OverflowError: signed integer is greater than maximum
  </code></pre>
  
  <p>So then what is the proper way to parse that date?  Is that "greater than maximum" referring to an individual field within the date - or to the entire string?</p>
  
  <p><strong>Update</strong> Jakob provided correct way</p>
  
  <pre><code>In [21]: from datetime import datetime
  
  In [22]:     datetime.strptime(s,DateFormat)
  Out[22]: datetime.datetime(1900, 6, 25, 18, 13, 6)
  </code></pre>