Things I have tried
Hello,
I want to display some files who have a due-date
sth like “Deadlines in 14 days” in a dataview query,
i used this code:
WHERE due-date.weekyear = (date(today).weekyear +2)
…for the next 14 days
but in case of the current change of year it doesnt seem to work
What I’m trying to do
Well, how should dataview know, that after week 52 comes week 1?
is there a special algorythm or mathematical thing to get this done?
greetings and all the best for the new year!
mnvwvnm
2
You can try something like this:
WHERE dateformat(due-date, "yyyy-WW") = dateformat(date(today) + dur(2 weeks), "yyyy-WW")
-
yyyy-WW
produce a string with the year and the week of the year. in this way you can associate year and week.
-
date(today) + dur(2 weeks)
gives you a date two weeks after today
1 Like
Hello again… 
ah, yes
i wondered why i got this:
... - No implementation found for 'number + duration...
but your trick of converting the date into a string outsmarts the thing
thanks again,
always nice here, come all well into the new year!
mnvwvnm
4
date(today) + dur(2 weeks)
, not date(today).weekyear + dur(2 weeks)
1 Like
all fine,
the error message came from my scribbling…
your code works ‘null problemo’ 
1 Like
system
Closed
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.