Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'chime': 0.09; 'skip:t 60': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'cc:2**0': 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'guess': 0.27; 'way?': 0.29; '(and': 0.32; 'anyone': 0.33; 'received:google.com': 0.34; 'entered': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'method': 0.36; "i'll": 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:" 10': 0.40; 'lastly,': 0.84 Newsgroups: comp.lang.python Date: Mon, 29 Oct 2012 19:13:56 -0700 (PDT) In-Reply-To: <85ea1841-6849-4970-b08b-5c7bbb7bba14@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.224.158.131; posting-account=1oR0EAoAAAANUNTZzTcJtVHDa9M690er References: <50e576ea-2ebe-4340-954e-6c23b5885680@googlegroups.com> <508F1973.2030907@digipen.edu> <6101355b-ae00-4482-96ee-ed60f5cb465f@googlegroups.com> <85ea1841-6849-4970-b08b-5c7bbb7bba14@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 71.224.158.131 MIME-Version: 1.0 Subject: Re: date and time comparison how to From: noydb To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351563245 news.xs4all.nl 6870 [2001:888:2000:d::a6]:48801 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32458 I guess I get there eventually! This seems to work pdf_timeStamp = time.strftime("%m%d%y%H%M%S",time.localtime(os.path.getmtime(pdf))) intermediateTime = time.strptime(pdf_timeStamp, "%m%d%y%H%M%S") pdfFile_compareTime = time.mktime(intermediateTime) (and I'll do the same to the user entered date-n-time and then compare) Lastly, so can anyone chime in and tell me if this is a good method or not? Is there a better way?