Kent Johnson wrote:
>
> It looks like Gustavo Niemeyer's dateutil module will at least do the
> year/month/day calculation if not the formatting:
>
> In [1]: from datetime import date
> In [2]: from dateutil import relativedelta
> In [3]: now = date.today()
> In [9]: rd = relativedelta.relativedel
William Allison wrote:
> Is there a way to have the output of "print tis" in the same format as
> "print now" and "print tafmsd" in the code below?
> Thanks,
> Will
>
>
> savage:~ wallison$ python
> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on
Alan Gauld wrote:
> "R. Alan Monroe" <[EMAIL PROTECTED]> wrote
>
>
>>> Is there a way to have the output of "print tis" in the same format
>>> as
>>> "print now" and "print tafmsd" in the code below?
>>>
>
>
>>> >>> now = datetime.date.today()
>>> >>> print now
>>> 2007-04-01
>>> >
"R. Alan Monroe" <[EMAIL PROTECTED]> wrote
>> Is there a way to have the output of "print tis" in the same format
>> as
>> "print now" and "print tafmsd" in the code below?
>> >>> now = datetime.date.today()
>> >>> print now
>> 2007-04-01
>> >>> tis = now - tafmsd
>> >>> print tis
>> 4785 d
> Is there a way to have the output of "print tis" in the same format as
> "print now" and "print tafmsd" in the code below?
> Thanks,
> Will
> savage:~ wallison$ python
> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
> Type "help", "copy