Hi all,
Is there a way to compare if the current date (date of audience eval) is less than an imported date field in an AEP audience? We have a requirement for this, and I'm not sure how to approach it.
Thanks
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Could you potentially give a basic example of what this data your trying to compare would look like?
Thanks,
David
@trojan_horse This is possible, check the screenshot where you need drop these two fields in same upper container of "segment membership per namspace" container along with compare field to get required audience.
Note: "Segment membership map" should contain "ups" as string and segment membership per namspace should contain the audience id.
#1 Depicts addition of Segmentation status and las qualified time
#2 Depicts dragging attribute for comparison.
I hope this solves your need.
~cheers,
NN
Hi,
Yes, you can compare dates in Adob Experience Platform (AEP) to evaluate if the current date is less than an imported date field. Here’s a general approch:
1.
- Use a profile script to compare the current date with the imported date field.
2.
- Write a JavaScript code snippet to compare the dates.
Here's an example of how you might do it:
```javascript
// Get the current date
var currentDate = new Date();
// Get the imported date field (assuming it's stored as a string in 'YYYY-MM-DD' format)
var importedDateString = profile.attributes.importedDate; // Replace 'importedDate' with your field name
var importedDate = new Date(importedDateString);
// Compare the dates
if (currentDate < importedDate) {
return true; // Current date is less than the imported date
} else {
return false; // Current date is not less than the imported date
}
```
3.
- Create or update the profile script in AEP to include this logic.
4.
- Test the script to ensure it correctly evaluates the date comparison.
If you need more detailed instructions specific to your AEP setup, consider reaching out to Adobe support or consulting the AEP documentation.
@trojan_horse Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes