I have a script that gets a string in the form of 3/4/2013. How can I convert that to a date that I can then use to determine the age of the date (in months)? I would also like to be able to have the month in decimal form (i.e. 2.8 months old).
I'm not sure what to do at all as far as coding this. I've read about different libraries that can do things like this, but I'm not sure what one is best.
EDIT: Assume a month has 30 days. This is what I have so far:
import time
def ageinmonths( str )
return time.today() - time.strptime("3/4/2013", "%b %d %y")