I have this code
%~~ SEARCH{
~~~ "
~~~ name ~ 'OperabilityReview*' AND
~~~ form.name ~ '*OperabilityReviewForm' AND
~~~ ProjName ~ '%URLPARAM{"qPrj"}%*' AND
~~~ ( d2n(ReviewDate) >= d2n('%URLPARAM{"qDate1" default="1969-12-31"}%') AND
~~~ d2n(ReviewDate) <= d2n('%URLPARAM{"qDate2" default="2020-12-31"}%') ) AND
~~~ ReviewStatus ~ '%URLPARAM{"qStat"}%*'
~~~ "
~~~ type="query"
~~~ format="|
~~~ $formfield(ProjName) |
~~~ $formfield(ReviewDate) |
~~~ $formfield(ReviewStatus) |
~~~ " }%
I expected that if
ReviewDate
was blank, then
d2n(ReviewDate)
would return
0
and match
>= d2n('%URLPARAM{"qDate1" default="1969-12-31"}%')
but it did not.
d2n of an empty string (unset field) is not documented.
I think
- it should be documented
- it should be 0
--
TWiki:Main/VickiBrown
- 11 May 2010