Re: [Zope] Trouble with dates in an External Method

2001-01-10 Thread Andy McKay

try this kind of whacky line:

from DateTime.DateTime import DateTime

you can then do

date1= DateTime(str1)
date2= DateTime(str2)
if date1==date2:
...

--
  Andy McKay.


- Original Message -
From: "Steven Grimes" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 09, 2001 10:43 PM
Subject: [Zope] Trouble with dates in an External Method


I'm having trouble using dates in an external method. I can't get it to
import the python DateTime module. I need to compare two dates which are in
string form in the external method. I know that this isn't a good
description of what I'm trying to do but I'm new to Zope development. If
this should go to a different mailing list please let me know.

Thanks in advance for any help,
Steven



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Trouble with dates in an External Method

2001-01-10 Thread Dieter Maurer

Steven Grimes writes:
  This is a multi-part message in MIME format.
  
  --=_NextPart_000_0009_01C07A9E.4B9BD860
  Content-Type: text/plain;
   charset="iso-8859-1"
  Content-Transfer-Encoding: quoted-printable
Please do not post MIME messages to this list!

  ... external method does not import DateTime ...
And what error do you get?

I tried:

  from DateTime import DateTime

  def f():
return DateTime('2001/01/09')

and there was no problem.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )