Convert 11/2/1998 to 110298
<p>What is the simplest way to convert a date formatted <code>3/2/2004</code> to <code>030204</code> in pure bash, or if not possible, then Python?
I need to at zeros in front of an single digit sectors of the date, remove the parenthesis, and have only the last two characters of the 4 digit year.
I know I could write an extensive Python script that would create an array splitting at <code>/</code>, and for any single digit arrays I would add a <code>0</code>. I  don't want to do this because it seems unnecessary. Thanks in advance for any help!</p>

<pre><code>import datetime

d = datetime.datetime.strptime("11/2/1998", "%d/%m/%Y")
print d.strftime("%d%m%y")
</code></pre>

python bash awk sed grep