Re: PyLZMA lastwritetime file to python datetime

2011-04-22 Thread rabusta
On Apr 22, 5:12 pm, Chris Rebert wrote: > [Mildly educated guess after > scanninghttps://github.com/fancycode/pylzma/blob/master/py7zlib.py]: > > It's likely a Unix timestamp. Perhaps try > datetime.datetime.utcfromtimestamp() or > datetime.datetime.fromtimestamp() > ?http://docs.python.org/libr

Re: PyLZMA lastwritetime file to python datetime

2011-04-22 Thread Chris Rebert
On Fri, Apr 22, 2011 at 1:49 AM, rabusta wrote: > How convert lastwritetime file to python datetime? [Mildly educated guess after scanning https://github.com/fancycode/pylzma/blob/master/py7zlib.py ]: It's likely a Unix timestamp. Perhaps try datetime.datetime.utcfromtimest

PyLZMA lastwritetime file to python datetime

2011-04-22 Thread rabusta
How convert lastwritetime file to python datetime? -- http://mail.python.org/mailman/listinfo/python-list

Re: python datetime

2010-09-14 Thread Von
Thank you,the timedelta class is awesome. On Tue, Sep 14, 2010 at 3:50 PM, Michael Ricordeau < michael.ricord...@gmail.com> wrote: > > # Determine diff days between two dates > import datetime > now = datetime.date(2010, 9, 28) > next = datetime.date(2010, 10, 5) > delta = next - now > > #delta i

Re: python datetime

2010-09-14 Thread Michael Ricordeau
# Determine diff days between two dates import datetime now = datetime.date(2010, 9, 28) next = datetime.date(2010, 10, 5) delta = next - now #delta is datetime.timedelta type. #(You can extract days diff) # Determine date in 7 days import datetime now = datetime.date(2010, 9, 28) delta = dateti

Re: python datetime

2010-09-14 Thread Peter Otten
t; import datetime as dt >>> dt.date(2010, 9, 28) + dt.timedelta(days=7) datetime.date(2010, 10, 5) See http://docs.python.org/library/datetime.html Why didn't you find that yourself? It's the first match if you google for python datetime. Peter -- http://mail.python.org/mailman/listinfo/python-list

python datetime

2010-09-14 Thread Von
Hi, How to determine a date is just the 7th day after today ie: today is 14 Sep the 7th day is 14+7 = 21,but assume today is 28 Sep the 7th day is 5 Oct,is there simple way to do this work? I wish I explained clear Bests, -- http://mail.python.org/mailman/listinfo/python-list

Re: Python DateTime Manipulation

2009-01-15 Thread Jervis Whitley
On Fri, Jan 16, 2009 at 9:19 AM, Kingston wrote: > I have a user input a date and time as a string that looks like: > "200901010100" but I want to do a manipulation where I subtract 7 days > from it. > > The first thing I tried was to turn the string into a time with the > format "%Y%m%d%H%M" and

Re: Python DateTime Manipulation

2009-01-15 Thread Chris Rebert
On Thu, Jan 15, 2009 at 2:19 PM, Kingston wrote: > I have a user input a date and time as a string that looks like: > "200901010100" but I want to do a manipulation where I subtract 7 days > from it. > > The first thing I tried was to turn the string into a time with the > format "%Y%m%d%H%M" and

Python DateTime Manipulation

2009-01-15 Thread Kingston
I have a user input a date and time as a string that looks like: "200901010100" but I want to do a manipulation where I subtract 7 days from it. The first thing I tried was to turn the string into a time with the format "%Y%m%d%H%M" and then strip out the day value, turn it into an int and subtrac