Hello EPI Users,
Does anyone know if it’s possible to filter a BAQ or a dashboard with the following value - two weeks from Friday of this week.
The syntax in my baq calculated field seems to come back as okay, but i am not sure if it’s correct.
GETDATE() SET DATEFIRST 5, DATEADD(week,2,GETDATE()) ‘SET DATEFIRST 5 + 2 Weeks’
My lack of coffee brain is having a hard time reading that, but try converting the date to string before passing to dateadd.
(Jose C Gomez)
Like @klincecum I can’t make heads or tails of what you posted I’m not sure it even clears syntax… (at least in my brain) here’s how I’d do it
DATEADD(WEEK, 2, DATEADD(DAY, (12 - DATEPART(WEEKDAY, GETDATE())) % 7 + 1, GETDATE()))
This assumes Friday is the last day of the week (which is default in MSSQL). Note if TODAY is Friday this will give you 2 weeks after the next friday.
You can also do it with a BAQ constant.
dateadd(week, 2, Constants.LastDayOfWeek)