Checking for nulls in a date/time field
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
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 )
On Wednesday 30 October 2002 12:21 pm, 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.
Try <dtml-unless expr="verify_close-date"> That will catch a null field
participants (3)
-
Ben Avery -
McDonnell, Larry -
Michael