Goal is to find rows where the date is exactly 30 days from today.
Source is a Salesforce Date/Time field from a Synchronised Data Extension and posted to a regular Data Extension to Date attribute. Should be simple enough..
The values are in the following format:
Saturday, July 10, 1965 12:00 AM
This otherwise valid query doesn't return any results:
WHERE a.DateTimeField = DateAdd(day,30,cast(GetDate() as date))
This one also doesn't return any results:
CONVERT(date, a.DateTimeField) = CONVERT(date, DATEADD(day,+30, GETDATE()))
And this one returns results +29 days and +30 days:
DATEPART(DAYOFYEAR, DateField) = DATEPART(DAYOFYEAR,(getUTCDate()+30))
Anyone have any ideas what else to try?