# Open Tasks
```dataview
TASK
WHERE !completed AND !checked
SORT file.ctime asc
I would like to add the age in days for each non completed task before the task, so:
o Configure Obsidian on Laptop
Would display as:
o [2d] Configure Obsidian on Laptop
Assuming that the task has been open and non completed for 2 days now.
I can calculate the age in days, I am just not sure how to add it to the task line, or create a second column which would display it.
Any suggestions / code examples would be greatly appreciated.
Thanks in advance.
The trick to this kind of query is to use FLATTEN ... as Visual. Then it’ll display this text instead of the ordinary text, whilst still keeping the ordinary task linkage.
So in your case try something like:
TASK
WHERE !completed AND !checked
FLATTEN
"[" + (date(today) - file.cday).days + "d] "
+ text as visual
SORT file.ctime asc
```
Which in my test scenario output this amongst a whole bunch of other not completed tasks:
If you want to you could also include the text in <span> elements and style them. One variant using this trickery:
```dataview
TASK
WHERE !completed AND !checked
FLATTEN
"<span style='background-color: teal; font-size: 70%; vertical-align: top'>["
+ (date(today) - file.cday).days
+ "d]</span> "
+ text as visual
SORT file.ctime asc
```
Which displays the same segment as in previous image:
Hope this helps! Do note that using file.ctime and/or file.cday could be slightly unreliable depending on your sync regime, and other file system dependent stuff, and that in any case it’ll refer to the file date, not when you added/changed any given task in that file.