Re:[Zope] Newbie: Date checking?

2000-07-07 Thread Andy Gates

Message-ID: <[EMAIL PROTECTED]>
Priority: NORMAL
X-Mailer: Execmail for Win32 5.1 Build (9) 
MIME-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"

> Is better to put some mor lines from Traceback Exception
> To see the modul and the line

Here it is:
Traceback (innermost last):
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 214, in 
publish_module
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 179, in publish
  File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 202, in 
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 165, in publish
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: news_maintenance)
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 102, in call_object
(Object: news_maintenance)
  File C:\PROGRA~1\WebSite\lib\python\OFS\DTMLMethod.py, line 150, in __call__
(Object: news_maintenance)
  File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line 502, in 
__call__
(Object: news_maintenance)
  File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_In.py, line 691, in renderwob
(Object: sql_news_search(story='%%'))
  File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 335, in eval
(Object: _.DateTime(startdate).isPast())
(Info: startdate)
  File , line 0, in ?
  File C:\PROGRA~1\WebSite\lib\python\DateTime\DateTime.py, line 545, in __init__
TypeError: (see above)

Any clues?

Andy

___
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] Newbie: Date checking?

2000-07-06 Thread Marcel Preda

>  _.DateTime(expirydate).isFuture()">
> > ...
> > ...
> > 
>
> This gives:
> Error Type: TypeError
> Error Value: __div__ nor __rdiv__ defined for these operands

Is better to put some mor lines from Traceback Exception
To see the modul and the line
>
> The dates are pulled from an access (!) database where they are defined
> as date/time types.
>
>Me confoosed.
>
> Andy G

Me too.


Someting like

STORY


or


STORY


works on Zope 2.1.4  and Zope 2.1.6

I was thinking that are strings, I have made this  many, many times.



btw: what type are IN ZOPE?

If are date/type in Zope , I guess that you can use something like


Maybe you are lucky, I didn't test it :)




PM




___
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] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Andy Gates

> 
> ...
> ...
> 

This gives:
Error Type: TypeError
Error Value: __div__ nor __rdiv__ defined for these operands

The dates are pulled from an access (!) database where they are defined
as date/time types.  Me confoosed.

Andy

___
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] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Andy Gates

Message-ID: <[EMAIL PROTECTED]>
Priority: NORMAL
X-Mailer: Execmail for Win32 5.1 Build (9) 
MIME-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"

> 
> ...
> 

I'll work it out one day, honest.  Ta.

AndyG

___
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 )




[Zope] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Marcel Preda

- Original Message -
From: Andy Gates <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 4:06 PM
Subject: [Zope] Newbie: Date checking?




> A quicky for you Zopistas:  I have some dates in a database, which
> govern when a story becomes live and when it expires.  I need to do a
> test along the lines of:
>
> dtml-in stories
>   if (startdate is past) and (expirydate is future)
> show the story
>   /if
> /in
>
> I have seen the fmt parameters isPast and isFuture and this gives me a
> true/false response:but how do I use
> that in an if test?
>>>>>>>>>> I keep (as usual) getting syntax errors.
:)



...
...



PM


___
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 )




[Zope] Newbie: Date checking?

2000-07-06 Thread Andy Gates

A quicky for you Zopistas:  I have some dates in a database, which 
govern when a story becomes live and when it expires.  I need to do a 
test along the lines of:

dtml-in stories
  if (startdate is past) and (expirydate is future)
show the story
  /if
/in

I have seen the fmt parameters isPast and isFuture and this gives me a 
true/false response:but how do I use
that in an if test?  I keep (as usual) getting syntax errors.  Help!

--
Andy Gates, Learning and Research Technology
[EMAIL PROTECTED] - ICQ#74362415


___
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 )