Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!

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