We are trying to convert a string field to a date field using the CAST function in Marketing Cloud. Our goal is to use the newly converted date records to segment our subscribers based on the date of purchase (last 30 days). However, we're keep getting the " Could not convert date and/or time from string data type" error in Automation Studio and Query Studio. An example of a record in the string field "Date_Dispo" is: "15/10/2019". Below's the SQL code:
SELECT Customer_Key, Email, Date_Dispo
FROM Audience_1
WHERE DATEDIFF(day, CAST(Date_Dispo as Date),CAST(Getdate() as date)) <= 30
Please help. Thanks