Forum Discussion
Giada90
1 year agoHelper IV
dynamic date selecting a date filter
Hi, I need to create a text with dynamic date based on selected filter date. For example if I select 2023 I need to see -starts before 01/01/2024 and end after 01/01/2025. -starts before 01/...
- 1 year ago
var Year = Selectedvalue( table[year] ) + 1 var startofYear = DATE( Year, 1, 1 ) var startofFollowingYear = DATE( Year + 1, 1, 1 ) var endofYear = startofFollowingYear - 1 return "-starts before " & startofYear & " and end after " & startofFollowingYear & "." & CHAR(10) & "-starts before " & startofYear & " and end on " & endofYear & "." & CHAR(10) & "starts and end in " & Year & "." & CHAR(10) & "starts in " & Year & "and ends after " & startofFollowingYear & "."You might want to wrap the dates in FORMAT( , "dd/mm/yyyy") to format them as you like
Deku
1 year agoSuper User
var Year = Selectedvalue( table[year] ) + 1
var startofYear = DATE( Year, 1, 1 )
var startofFollowingYear = DATE( Year + 1, 1, 1 )
var endofYear = startofFollowingYear - 1
return
"-starts before " & startofYear & " and end after " & startofFollowingYear & "." & CHAR(10) &
"-starts before " & startofYear & " and end on " & endofYear & "." & CHAR(10) &
"starts and end in " & Year & "." & CHAR(10) &
"starts in " & Year & "and ends after " & startofFollowingYear & "."
You might want to wrap the dates in FORMAT( , "dd/mm/yyyy") to format them as you like
Giada90
1 year agoHelper IV
thanks!