[egenix-users] mxDateTime puzzle

Charlie Clark charlie at egenix.com
Fri May 2 12:45:55 CEST 2008


Am 02.05.2008, 11:29 Uhr, schrieb Dick Moores <rdmoores at gmail.com>:

> Win XP, Python 2.5.1, mxDateTime v.3
> I'm trying to begin to master both Python's datetime module and
> mxDateTime. I have a script that does something useful for me with
> datetime: <http://py77.python.pastebin.com/f25c957>. Note the user is
> able to enter a date in informal U.S. style. E.g. yesterday's as
> 5/1/2008.
> I've tried hard to write a script that does the same with mxDateTime,
> but am not able to incorporate the same date style. I'm stuck at
> having the user enter a date as "year, month, date". This effort is at
> <http://py77.python.pastebin.com/f130055a1>
> Please suggest how to modify this to meet my objective.

Hi Dick,

try:

mx.DateTime.Parser.DateTimeFromString(s)

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