Re: Can anyone suggest a date peocedure...

2008-07-12 Thread RV
On Thu, 10 Jul 2008 20:04:27 -0400, RV <[EMAIL PROTECTED]> wrote: Gary, Larry, Michiel , Thanks very much, your helpful info has enabled me to get past a learning bump. Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone suggest a date peocedure...

2008-07-10 Thread Michiel Overtoom
Ron wrote: Now all I need to know is how to plug the date into the datetime object from a string. You could use simple string manipulation: >>> import datetime >>> a="20081031" >>> d=datetime.date(int(a[0:4]),int(a[4:6]),int(a[6:8])) >>> d datetime.date(2008, 10, 31) >>> print d 2008-10-31

Re: Can anyone suggest a date peocedure...

2008-07-10 Thread Larry Bates
RV wrote: On Thu, 10 Jul 2008 13:39:29 -0700, Gary Herron <[EMAIL PROTECTED]> wrote: The datetime module has what you need. It has methods (with examples) on building a datetime object from a string, and it has a object named timedelta, and the ability to subtract a timedelta from a time.

Re: Can anyone suggest a date peocedure...

2008-07-10 Thread Gary Herron
RV wrote: On Thu, 10 Jul 2008 13:39:29 -0700, Gary Herron <[EMAIL PROTECTED]> wrote: The datetime module has what you need. It has methods (with examples) on building a datetime object from a string, and it has a object named timedelta, and the ability to subtract a timedelta from a time

Re: Can anyone suggest a date peocedure...

2008-07-10 Thread RV
On Thu, 10 Jul 2008 13:39:29 -0700, Gary Herron <[EMAIL PROTECTED]> wrote: >The datetime module has what you need. > >It has methods (with examples) on building a datetime object from a >string, and it has a object named timedelta, and the ability to subtract >a timedelta from a time. > >For in

Re: Can anyone suggest a date peocedure...

2008-07-10 Thread Gary Herron
RLV wrote: I'd like to find a simple... (I'm a simple person) procedure to subtract a numerical number from a six char date string MMDD and then convert back to a new date string. I'm sure there's a way to do it, but the date modules haven't been much help. TIA Ron -- http://mail.python.

Can anyone suggest a date peocedure...

2008-07-10 Thread RLV
I'd like to find a simple... (I'm a simple person) procedure to subtract a numerical number from a six char date string MMDD and then convert back to a new date string. I'm sure there's a way to do it, but the date modules haven't been much help. TIA Ron -- http://mail.python.org/mailman/li