[egenix-users] mxDateTime puzzle
rdmoores at gmail.com
Fri May 2 05:24:22 CEST 2008
On Fri, May 2, 2008 at 4:16 AM, Charlie Clark <charlie at egenix.com> wrote:
> Am 02.05.2008, 13:04 Uhr, schrieb Dick Moores <rdmoores at gmail.com>:
>> Here's my problem:
>> from mx import DateTime as DT
>> dstr = raw_input("Enter date as month/day/year, or enter nothing for
>> today: ")
>> date = DT.Parser.DateFromString(dstr)
>> print date
>> print date - 30
>> Enter date as month/day/year, or enter nothing for today: 3/3/2008
>> 2008-03-03 00:00:00.00
>> 2008-02-02 00:00:00.00
>> I want those 2 bottom dates to be
> please keep the discussion on the list.
Sorry, my mistake.
I'm not sure I understand your
> problem. Do you need to display the dates in US-format.
Not sure exactly what you mean by US-format. What I want is '5/1/2008'
or '05/01/2008' for May 1, 2008.
> They are not good
> examples for parsing but they seem to be parsing correctly. With your
> previous error - I'm not sure if you really do have the correct version of
> mx.DateTime. Can you please check DT.__version__
>>> from mx import DateTime as DT
More information about the egenix-users