I'm trying to convert a text field to date and only pull back records that have a date of yesterday but getting zero records back. I've converted the text to date part but can't get the where clause working and not sure where I'm going wrong.
SQL Query:
SELECT
REQUEST_DATE,
convert(varchar, REQUEST_DATE ,101) as REQUEST_DATE1
FROM temp
Where convert(varchar, REQUEST_DATE ,101) > DATEADD(DAY,-1,getdate())
Best Answer
If you just want rows from yesterday, you can do something like this:
If your
request_date
is actually a date datatype in SFMC, then you can simplify it like this: