Date Time filter

Hi All ,

I have a Date and Time field in my CDT (type DATE in the Oracle database). This field has a date and a time. I create a query entity rule with the filter:

a!queryFilter(
field: "recertificationDate",
operator: "=",
value: ri!recertificationDate,
applyWhen: not(
rule!APN_isBlank(
ri!recertificationDate
)
)
)

In the database, I have records with the date and time of 4/15/2019 4:05 PM but when I test my rule with ri!recertificationDate = 4/15/2019 4:05 PM, the rule is returning NO records. Any ideas why this is happening?

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    If I'm not mistaken, the date and time field actually stores a numeric value that's specific down to the millisecond (and if not, then at least down to the second).  You will not necessarily see this detail just by looking at the DB via phpMyAdmin or other general tools.  To get around this, you could try making your query filter find a range that encompasses a few minutes (such as, between 4:04:59 PM - 4:06:00 PM), so any values in between will return in a search result.

    A second consideration is that the DB will store date and time in GMT time, so unless you already have, you probably need to account for GMT conversion when passing in your filter value.