RE: [Zope] Checking for nulls in a date/time field
Thanks Ben, the unless statement worked... -----Original Message----- From: Ben Avery [mailto:ben@thesite.org] Sent: Wednesday, October 30, 2002 2:26 PM To: McDonnell, Larry Cc: 'Zope@Zope. Org' (E-mail) Subject: Re: [Zope] Checking for nulls in a date/time field the pythonic equivalent of a NULL is None, so try <dtml-if "verify_close_date == None"> or even <dtml-unless verify_close_date> HTH Ben Avery McDonnell, Larry wrote:
Hi,
I thought I saw this before but I am having difficulty in findin gthis answer. I use MS Access and can save the dates in their date/time format. But if the field is empty (close_date) and I populated with a Null, how do I find it?
I used this-
<dtml-if expr="verify_close_date=='Null'"> and I tried this <dtml-if expr="verify_close_date==' ' ">.
I'm just looking for a pointer, thanks.
Larry McDonnell
Proton Energy Systems 10 Technology Drive Wallingford, CT 06492 (203) 678-2181 Email:lmcdonnell@protonenergy.com www.protonenergy.com
_______________________________________________ Zope maillist - Zope@zope.org 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 )
I would like somebody helps me to undestand what does exactly "session invalidate" mean. TIA, p.t. I've tryied the DTML code example reported at the end, and I've got this result: The result: The 'data' name now refers to a new or existing session data object. data: id: 10360077861432189970, token: 54001646A0iEAi2X9io, contents: [] Developers can manually invalidate a session data object. When a session data object is invalidated, it will be flushed from the system, and will not be returned by subsequent references to REQUEST.SESSION or getSessionData(). The invalidate() method of a session data object causes this to happen: call invalidate And now, checking again for data session: The 'data' name now refers to an existing session data object or None if there was no existing browser id or session data object. data: id: 10360078530598187012, token: 54001646A0iEAi2X9io, contents: [] the DTML code: <pre> <dtml-let data="session_data_manager.getSessionData()"> The 'data' name now refers to a new or existing session data object. <b>data</b>: <dtml-var data> Developers can manually invalidate a session data object. When a session data object is invalidated, it will be flushed from the system, and will not be returned by subsequent references to REQUEST.SESSION or getSessionData(). The invalidate() method of a session data object causes this to happen: call invalidate <dtml-call "data.invalidate()"> </dtml-let> And now, checking again for data session: <dtml-let data="session_data_manager.getSessionData(create=0)"> The 'data' name now refers to an existing session data object or None if there was no existing browser id or session data object. <b>data</b>: <dtml-var data> </dtml-let> </pre>
participants (2)
-
McDonnell, Larry -
p.t.