Skyler Spaeth Skyler Spaeth - 3 months ago 7
Python Question

Convert 11/2/1998 to 110298

What is the simplest way to convert a date formatted

3/2/2004
to
030204
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
/
, and for any single digit arrays I would add a
0
. I don't want to do this because it seems unnecessary. Thanks in advance for any help!

Answer
date -d'11/2/1998' +%m%d%y
110298