Search code examples
qlikviewqliksenseqlik-expression

Date function on Field not working on a count


I have a Count which is giving me the following error:

Error in set modifier expression

The Expression is:

=Count({<date(STARTTIMEDATE)={"$(=Date(Today()))"}>} IDID)

STARTTIMEDATE is in the format of YYYY-MM-DD HH:MM:SS:XXXXXX


Solution

  • I have resolved this by using  this in my load script:

    CONVERT(VARCHAR(10),CAST(STARTTIMEDATE as DATE),103) AS STARTDATE
    

    Then this as my expression:

    =Count({$<YEAR=,STARTDATE={"$(=Date(Today()-1))"}>} IDID)