Using datetime.strptime to get date from string using python
<p>i have a bunch of strings like this:
s = 3851102123</p>

<p>objective would be to extract the date from it
in example: <br>
85 is year<br>
11 is month<br>
02 is day<br></p>

<p>basically string indexes 1,2 = year, 3,4 = month, 5,6 = day<br>
rest can be discarded, this is what i came up with:</p>

<pre>>> x = datetime.strptime("3851102123", ??)</pre>

<p>How would one extract the proper indexes? </p>

<p>Should i use regular expressions inside the parentheses  to get the date out and then reformat the string ?</p>

<p>Output should like this:</p>

<pre>>> 02.11.1985 </pre>
