Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Compare date in QoQ

$
0
0

Hi all,

How can I compare a date in query of query? The date can be null in some records.

      <cfquery name="qryData" dbtype="query">

            select *

            from qryTempData

            where (datecompare(ppbe_id_expiration, dateFormat(now())) >= 0) OR (ppbe_id_expiration is NULL)

      </cfquery>

I also try:

       <cfquery name="qryData" dbtype="query">

            select *

            from qryTempData

            where (ppbe_id_expiration is NULL) OR (cast(ppbe_id_expiration as date) >= cast(dateFormat(now(),'mm/dd/yyyy') as date)

        </cfquery>

Using CF9.

Thanks,


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>