Hello. I'd like to make a calculated fiield to show datediff('end date','last thursday'). how do I represent 'last thursday' in that? The 'end date' is a sate in my data.
Ended up using this to be the 'last Thursday' part. Not sure if ther is a more elegant way for it but it does the job.casewhen DAYOFWEEK(CURRENT_DATE())=1 then CURRENT_DATE()-3when DAYOFWEEK(CURRENT_DATE())=2 then CURRENT_DATE()-4when DAYOFWEEK(CURRENT_DATE())=3 then CURRENT_DATE()-5when DAYOFWEEK(CURRENT_DATE())=4 then CURRENT_DATE()-6when DAYOFWEEK(CURRENT_DATE())=5 then CURRENT_DATE()-1when DAYOFWEEK(CURRENT_DATE())=6 then CURRENT_DATE()-2when DAYOFWEEK(CURRENT_DATE())=7 then CURRENT_DATE()-3end