2 Replies Latest reply on Jan 24, 2005 11:05 AM by baudouin

    jboss QL with date and clause where

    baudouin Newbie


      I would like to write a finder in an EJB CMP with a date attribute(datenews).
      I would like to get the most recent objet from an EJB (max 2 month), is it possible with EJB-QL.

      It could seem to this expression (don't work) :

      query="SELECT OBJECT(n) FROM News AS n where TO_DAYS(NOW()) - TO_DAYS(datenews) <= 60