title: How can I add a zero to dates in a string so all months are 2 characters?
body: <p>I haved dates in this format:</p>
  <pre><code>bd1 = '05/27/2018      SW1604-3'
  </code></pre>
  <p>And this format:</p>
  <pre><code>bd2 = '9/16/2021      SU1'
  </code></pre>
  <p>I am using <code>dparser</code> to remove the extra text which works for dates in the format of <code>bd1</code>.</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; import dateutil.parser as dparser
  &gt;&gt;&gt; str(dparser.parse(bd1,fuzzy=True)).split(&quot; &quot;)[0]
  '2018-05-27'
  </code></pre>
  <p>However I notice that if the dates are not the same length, as is the case for <code>bd2</code> (i.e 9 instead of 09), I get an error message:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; import dateutil.parser as dparser 
  &gt;&gt;&gt; str(dparser.parse(bd2,fuzzy=True)).split(&quot; &quot;)[0] 
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;C:\Users\Noah Siegel\.conda\envs\webvitals\lib\site-packages\dateutil\parser\_parser.py&quot;, line 1368, in parse  
      return DEFAULTPARSER.parse(timestr, **kwargs)
    File &quot;C:\Users\Noah Siegel\.conda\envs\webvitals\lib\site-packages\dateutil\parser\_parser.py&quot;, line 643, in parse   
      raise ParserError(&quot;Unknown string format: %s&quot;, timestr)
  dateutil.parser._parser.ParserError: Unknown string format: 9/16/2021      SU1
  </code></pre>