Date_diff function in LookML

Punita:

Using date_diff with my previous dimension(below) gave me the below error as well,> “An error has been thrown from the AWS Athena client. SYNTAX_ERROR: line 4:11: Column ‘day’ cannot be resolved”> > dimension: date_diff {> type: number> sql: DATEDIFF(day, ${date_joined_date}, GETDATE())

Sounds like that syntax isn’t lining up with Athena’s datediff syntax, which is what I think @brecht and @Simon_Ouderkirk were suggesting. Looks like for athena it’s

date_diff('second', min(creation_time),max(ending_time))

Have you tried throwing day in single quotes? Not sure that’d make a difference or not— Also note you’ll want to use date_diff, not DATEDIFF.