Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

How to add current date in JavaScript condition Expression

Avatar

Level 3

Hi all,

I need to select data based on Last modified is today(current date) using Java script activity. So I used below script but Unable achieve the solution. Could you please help me here?

ramprakasht3196_0-1603458303513.png

 

 

Thanks in advance

6 Replies

Avatar

Community Advisor

Hello @ramprakasht3196 

 

Use GetDate() instead of new Date();

 

Thanks,

Manoj


     Manoj
     Find me on LinkedIn

Avatar

Level 3
I tried using both GetDate() and getCurrentDate(). It is not working inside QueryDef tag.

Avatar

Level 3

I tried using both GetDate() and getCurrentDate(). It is not working inside QueryDef tag. Could you please help me here?

@amritakedia_epsilon & @Manoj_Kumar_ 

Avatar

Community Advisor
Can you please confirm how you are using that GetDate() ? this is how it should be used <where> <condition expr="@expirationDate >= GetDate()"/> </where>

     Manoj
     Find me on LinkedIn

Avatar

Administrator

Hi @ramprakasht3196,

Were you able to resolve this query with any of the given solutions? Do let us know.

Thanks!



Sukrity Wadhwa