The following code produces the date to one week ahead. I want it to produce dates associated with all values of “week”.
I have tried inserting the key value “week” into the following code. This creates If I could replace “dur(1 week)” with "dur(“week” week) but this produces a dataview error.
TABLE WITHOUT ID
week, date(2023-01-02) + dur(1 week) as "Date after start"
FROM #course/tft
SORT week ASC
What I’m trying to do
I am trying to create a table that shows a date calculated from a numeric key value “week”. “week” indicates week from start and I would like the table to show the date corresponding 1, 2 3, … weeks from the start.
---
week: 3
duration: 3 week
---
```dataview
table without id duration, date(2023-01-02) + dur(duration) as "Date after start"
where file.name = this.file.name
```
In other words, type out the entire duration in your field?
With your original syntax
---
week: 3
---
```dataview
table without id week, some, date(2023-01-01) + dur(join([week, " week"], " ")) as date
flatten join([week, " week"], " ") as some
where file.name = this.file.name
```