Expand my Community achievements bar.

SOLVED

On or before a certain 'Date' using Javascript.

Avatar

Level 3

Hi All,

 

I have a requirement where I have to get select data from a range of date.

I am currently Using @partyDate >=  parsed_Date in querydef where condition.

But the data being returned is incorrect.

is the syntax correct. How do I pass 'on or after' parsed_Date in querydef where condition in javascript.

Please help.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @bhaskarc1289447 ,

 

Convert both dates to same format and then compare.

You can do something like:

const myDate = formatDate(result.@mailDate, "%4Y/%2M/%2D %02H:%02N:%02S")

 

Thanks,

Jyoti

View solution in original post

2 Replies

Avatar

Employee Advisor

ACC has its own data format. Check out this link to format the date correctly. 

https://experienceleague.adobe.com/developer/campaign-api/api/f-formatDate.html

Avatar

Correct answer by
Community Advisor

Hi @bhaskarc1289447 ,

 

Convert both dates to same format and then compare.

You can do something like:

const myDate = formatDate(result.@mailDate, "%4Y/%2M/%2D %02H:%02N:%02S")

 

Thanks,

Jyoti