0

I have a date format in the DE that includes minutes and seconds (4/09/2021 11:45:18 AM). I only need to search and show the records of a certain day (format; MM / D / YYYY). DateParse and FormatDate functions don't work for me

set @lookupValue = AttributeValue("lookupField")
                   set @lookupValue = '09/4/2021'

enter image description here

1
  • 1
    quick suggestion use sql to populate a text field with only the date part you want to lookup on
    – EazyE
    Commented Oct 4, 2021 at 19:14

1 Answer 1

2

AMPscript lookup criteria pairs only use = operators -- it doesn't handle > or <.

You'll need to either loop through all of the rows and check each one with an AMPscript conditional or do as @EazyE suggested, and create columns in your DE that match 1:1 with the criteria you'll need to select the rows exactly.

I usually just create a lookupKey column in my DE and default its value to 1 and then lookup for every row that matches 1. Here's an example.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .