Hi @trojan_horse ,
Use the Now token in the UI
Drag your start_date attribute onto the canvas.
Set the operator to is on or before and, in the date picker, choose Now (this represents the current timestamp).
Drag your end_date attribute onto the canvas.
Set the operator to is on or after and choose Now again.
Combine these with AND, and you’ve got exactly:
start_date <= Now
AND
end_date >= Now
This Now option is part of AEP’s time-constraint features in the Segment Builder UI
Use PQL in Code View
If you prefer to work in code or need to manage this programmatically, switch to Code view in the Segment Builder and you’ll see (or can edit) the equivalent Profile Query Language and add definition. You can then push this definition through the Segmentation API’s /audiences endpoint
Reference:
https://experienceleague.adobe.com/en/docs/platform-learn/tutorials/audiences/time-constraints
https://experienceleague.adobe.com/en/docs/experience-platform/segmentation/ui/segment-builder
Note: This response is inspired from Generative AI.
Thanks
Ankit