how to compare customproperty attribute with sysdate() in technical rule

Jaya
Regular Contributor
Regular Contributor

Hi All,

I want to create a detective technical rule through which we can compare a user's custom attribute with function sysdate()

I have used query- '(a.statuskey=1) AND (date(sysdate()) = date(a.customproperty45))' but this query isn't working. Customproperty45 is also DATE type field.

Kindly suggest solution for this.

Jaya_0-1670934869397.png

Thanks

Jaya karothia

 

Thanks
Jaya Karothia
7 REPLIES 7

sk
All-Star
All-Star

What is the format you are saving date value in CP45?


Regards,
Saathvik

Jaya
Regular Contributor
Regular Contributor

Hi Sk,

We have chosen attribute type as DATE in Global config for CS45.

Jaya_0-1670946970963.png

Jaya_1-1670947217751.png

 

Thanks

Jaya

Thanks
Jaya Karothia

I see it is working as expected for me with below condition

(a.statuskey=1) AND (date(a.CREATEDATE)=date(sysdate()))

sk_1-1670947601066.png

Can you check if you have any users with matching condition which you used?

 

 


Regards,
Saathvik

Jaya,

From above screenshot I see that User Form field you made a date field which you mapped to CP45 of user. But does CP45 of user table is of date type?


Regards,
Saathvik

Jaya
Regular Contributor
Regular Contributor

yes i think you are correct I just checked the datatype of CP45 it's tinytext.

Thanks
Jaya Karothia

rushikeshvartak
All-Star
All-Star

a.statuskey=1 and a.customproperty45=date_format(sysdate(),'%b %d, %Y')

rushikeshvartak_0-1670948830782.png

 

Jaya
Regular Contributor
Regular Contributor

Thank you so much Rushikesh.

Thanks
Jaya Karothia