title: Control string to date conversion of %y in Python
body: <p>I am trying to convert a raw csv file that has a value of 12/31/99 in a column in pandas.  I want to convert it to 12/31/2099.  But my code converts it to 12/31/1999 instead.</p>
  <p>If possible, I don't want to resort to hacks (like doing string manipulation and add 20 before the year number)</p>
  <p>I am using these formatting placeholders:  %m-%d-%y</p>
  <p>Is there a way to control how %y is converted? Below shows a simple program that illustrates my conversion pseudocode to check how conversion works on 00-99 year.  Basically, I want to control how it behaves 70+.</p>
  <pre><code>for _ in range(60 , 100, 10):
      t = &quot;03-01-{0}&quot;.format(str(_).zfill(2))
      x = datetime.strptime(t, '%m-%d-%y')
      print(t,&quot; &quot;,x)
  </code></pre>
  <p>Example:</p>
  <p><strong>input  :</strong></p>
  <pre><code>03-01-60
  03-01-70
  03-01-80
  03-01-90
  </code></pre>
  <p><strong>output :</strong> (notice 1970, 1980, 1990)</p>
  <pre><code>03-01-60   2060-03-01 00:00:00
  03-01-70   1970-03-01 00:00:00
  03-01-80   1980-03-01 00:00:00
  03-01-90   1990-03-01 00:00:00
  </code></pre>
  <p><strong>expected output :</strong></p>
  <pre><code>03-01-60   2060-03-01 00:00:00
  03-01-70   2070-03-01 00:00:00
  03-01-80   2080-03-01 00:00:00
  03-01-90   2090-03-01 00:00:00
  </code></pre>