Testing Dates

Discussion created by kreuzrsk on Oct 22, 2013
Latest reply on Oct 22, 2013 by xander_bakker
I've written a python script to strip broken map services from MXDs but I'd like to skip MXDs that haven't been modified in over a year.  I know how to get the date modified from a file using the code below but I don't know how to substract 1 year from the current datetime for testing which is greater.  I need help.  Thanks

now = time.time()
stats = os.stat(inputString)
lastmod = time.strftime("%m/%d/%y %H:%M:%S", time.localtime(stats[8]))