Re: [Tutor] Subract Month From Date

2005-05-03 Thread Karl Pflästerer
On 3 Mai 2005, [EMAIL PROTECTED] wrote: > What would be the simplest way to extract the Month and Year for one month > prior to the current month? I have been looking for a way to create a Date > object with the current date, and then subtract a month from it. Say it is > currently "January 1st,

Re: [Tutor] Subract Month From Date

2005-05-03 Thread Tim Peters
[Gooch, John] > Thank you for the idea, I could have been more clear that days part of the > date isn't important. Here is what I came up with: > >currentDate = datetime.datetime.fromtimestamp( time.time() ) Easier: today = datetime.date.today() >archMonth = 0 >archYear = 0 >

Re: [Tutor] Subract Month From Date

2005-05-03 Thread Gooch, John
world applications. Does anyone have a more elegant solution? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Johnson Sent: Tuesday, May 03, 2005 11:23 AM Cc: tutor@python.org Subject: Re: [Tutor] Subract Month From Date Gooch, John wrote: > What woul

Re: [Tutor] Subract Month From Date

2005-05-03 Thread Kent Johnson
Gooch, John wrote: > What would be the simplest way to extract the Month and Year for one month > prior to the current month? I have been looking for a way to create a Date > object with the current date, and then subtract a month from it. Say it is > currently "January 1st, 2005", I would like to

[Tutor] Subract Month From Date

2005-05-03 Thread Gooch, John
What would be the simplest way to extract the Month and Year for one month prior to the current month? I have been looking for a way to create a Date object with the current date, and then subtract a month from it. Say it is currently "January 1st, 2005", I would like to be able to subtract a month