[egenix-users] mxDateTime puzzle
Charlie Clark
charlie at egenix.com
Fri May 2 14:16:31 CEST 2008
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
> 3/3/2008
> 2/2/2008
Dick,
please keep the discussion on the list. I'm not sure I understand your
problem. Do you need to display the dates in US-format. 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__
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the egenix-users
mailing list