# [Finding Old Notes in Obsidian with Dataview - Obsidian Rocks](https://obsidian.rocks/finding-old-notes-in-obsidian-with-dataview/)
The first challenge when it comes to note-taking is *writing notes*. Note-taking doesn’t work if all you do is collect, you also have to sit down and *write*.
The second challenge is *remembering* what you write. If you write often, you’re bound to forget some of it. I know I have numerous articles (and notes) that I look back on and think “did I really write that?”
No AI here my friends: there are many things that I *actually did write* but don’t remember at all.
But if you use Obsidian, you can do something about that!
Systems for Recall
----------
If you know anything about me, you know that I like to set up systems to optimize my performance. That’s one reason I love Obsidian: [it is *exceptionally* good at systems](https://obsidian.rocks/building-systems-in-obsidian/).
Let’s talk about some different systems we can use to remember what we write.
How to Remember What You Write
----------
A few months ago I wrote about one of the simplest ways that I use to remember what I write. I use randomness to “accidentally” find notes that I once was interested in, but have recently forgotten. If you want to learn how to use randomness in your own vault, see [Embrace Serendipity: Discovering Old Notes in Obsidian](https://obsidian.rocks/embrace-serendipity-discovering-old-notes-in-obsidian/).
Randomness can be helpful, but there’s a more *strategic* way to find notes that need reviewing.
We can do this by using *dates*.
All we have to do is track the *last time you edited* a particular note. If we set up a system like that, then we can *query* your notes and *resurface* notes that we haven’t touched in a while.
So let’s do that!
Setting Up Date Fields for Your Notes
----------
In order to review a note a while after we last updated it, we first need to find a way to add “last modified” dates to our notes.
Fortunately, there are clever people who have built solutions for this, in the form of plugins.
The easiest way I’ve found is to use a plugin called [Update time on edit](https://obsidian.md/plugins?id=update-time-on-edit). The *Update time on edit* plugin does two things: when you create a note, it adds a date “created” field, and when you update a note, it adds (or updates) an “updated” field.
This plugin does have some settings, but for the purposes of this article, I suggest you leave the default settings. All you have to do is install and enable the plugin, and it will start tracking dates for you automatically. [Click to open the plugin in your vault](https://obsidian.md/plugins?id=update-time-on-edit).
Once you have the plugin installed and enabled, you might want to go update a few of your notes and make sure its working. If it is working, you should see this data appear in [the Properties](https://obsidian.rocks/an-introduction-to-obsidian-properties/) of any notes that you edit:

Once you’ve done that, we can move on to the fun part!
Setting Up a Review Dashboard
----------
Once we have our data set up, next we need to query the data.
### Creating a Last Updated view ###
We’re going to use Dataview to create our dashboards. If you’re new to Dataview, see our [introduction to Dataview](https://obsidian.rocks/dataview-in-obsidian-a-beginners-guide/) first. Familiarity with the fundamentals of Dataview will be helpful for you to be able to create and modify your own dashboards.
To start, let’s create a note called “Last Updated” and paste in this code:
```
```dataview
TABLE dateformat(updated, "yyyy-MM-dd - HH:mm") AS "Last modified"
FROM ""
SORT updated DESC
LIMIT 25
\```
```
This script fetches all of your *most recently updated* files, and lists them in a table. It doesn’t bother to actually check the date for any file, it just grabs every file that has an “updated” field, sorts them with the newest on top, and limits them to 25.
This is handy for finding a note that you *know* you edited recently, but can’t quite remember the title. It’s a great view to have on hand, but not quite what we’re looking for.
>
>
> Tip: the Last Updated view is a handy one to [pin to your sidebar](https://obsidian.rocks/pinning-notes-in-obsidian/). That way you can see a live-updating list of all the files you have modified recently.
>
>
### Creating a Six Month Review Dashboard ###
Now that we know what we’re doing (more or less!), we can jump into the deep end.
We already have a query that shows us *most recently updated* files. All we have to do now is add a *date comparison*, so we can use the same query to show us six months ago (or six weeks, or six years: whatever we want).
To do that, we have to change our query slightly. Create another note called “Review Old Notes”, and paste in this script:
```
```dataview
TABLE dateformat(updated, "yyyy-MM-dd - HH:mm") AS "Last modified"
FROM ""
WHERE updated AND updated <= date(today) - dur(6 months) AND updated >= date(today) - dur(6 months 7 days)
SORT updated DESC
LIMIT 25
\```
```
We can modify the script above to show any duration we want. By default I have it set to look back six months, but this may be too far or not far enough for you.
To change the date range, look for the code that says `6 months` and `6 months 7 days`. The script looks for anything *between* those days, so you can change that to `3 months` or `3 weeks` or whatever you like. Just be sure to keep the *second* date *further back* than the first, otherwise the script won’t work.
E.g.: If you change the first date to `12 months`, then second date has to be *further back*. So it could be `12 months 1 day`, `13 months`, `12 months 2 weeks`, or anything else as long as it is farther back than the first date.
### Reviewing By Date Created ###
The above script works for notes that you haven’t *updated* for a while, which is great if we’re trying to refresh our memory of old notes.
But what if we want to see when notes were *created*?
This too we can do easily, with a small change to the above script. All we have to do is swap out the *updated* field with the *created* field.
If you want to try it, create a new note called “Created 6 Months Ago” and paste this code:
```
```dataview
TABLE dateformat(created, "yyyy-MM-dd - HH:mm") AS "Created"
FROM ""
WHERE created AND created <= date(today) - dur(6 months) AND created >= date(today) - dur(6 months 7 days)
SORT created DESC
LIMIT 25
\```
```
Again, you can edit those durations if you want to. This script will show you notes that you *created* six months ago.
### Styling your Dashboards ###
By default these dashboards create tables:

And this works well enough. But personally, I prefer *card styling* for these sorts of tables.
Cards are a [feature of the Minimal theme](https://obsidian.rocks/how-to-use-the-minimal-theme-in-obsidian/#cards). If you use Minimal, you can turn the above tables into this:

To do this, add the `cssClasses` property to your notes, and add `cards` as the value, like this:
<img alt="A screenshot of properties in Obsidian, including file created and modified times." src="https://i0.wp.com/obsidian.rocks/wp-content/uploads/2023/10/created-and-updated.png?resize=617%2C356&ssl=1" height="356" width="617" />
Conclusion
----------
If you haven’t created your own time-based dashboards in Obsidian, I think you should try it!
It’s a great way to rediscover things that you once cared about. You might be surprised to discover how much you’ve forgotten in six months time, and how much easier it is to remember a note after you’ve reviewed it once or twice.