Examples
- How can I extract the start date of a range using Commands?Sep 26, 2024
Use
Insert relative date
command, here's an example:
There are two important ways that Tana treats date information. Date objects are a concept of time that you can link to, meanwhile a calendar node is a place in the graph you can write on that is related to a date. The two are intertwined but not the same.
Date objects can be mentioned on any node using @-mention. They have flexible date granularities so you can be as broad or specific as you want to be, allowing you to say "meet Henry at 2:15pm tomorrow", as well as "yearly goal for 2024".
Calendar nodes are what drive your daily page. They are automatically set up for days, weeks, months, and years, and allow you to take notes and set up searches that capture items in those date intervals.
@today
in Tana, and you'll see it bring up today's date.@November
, @Wednesday last week
, or @5pm next Saturday
. Once you have a date object, you can click it to bring up the date picker.-101
" = "101 BC
" = "-100
" in astronomical yearscreate default day/week/month/year tag
" on the calendar node to create them.today at 5pm
", "Nov 15
", "yesterday
", "last month
", "in two weeks
".add end
. Use remove end
to remove the range.@[date] to [date]
. Example: @Nov 21 to Nov 30
Switch calendars
Alt
+click the date object to navigate to that corresponding calendar nodeGo to calendar date node
/Open calendar date node in new panel
Week 45
, or November 2023
, you can Alt
+click to navigate to that corresponding calendar node✨NEW
You can also right-click the Today button under the title to navigate to this week/month/year.change workspace
to a different one. create default day/week/month/year tag
".At the bottom of each node is a reference section. For calendar nodes, it will collect all nodes in the workspace that mention that particular date granularity, either mentioned in name or in a field. Example: week nodes will capture any node that have date objects using the Week WW
granularity, month nodes will capture November YYYY
granularity and so on.
There are many search operators that are specifically designed to handle date queries, as well as general purpose numeric ones that work with date queries as well.
LT/GT is the only field operator in this list. Find nodes with date that are Less Than/Greater Than a particular date. Less = earlier, greater = later.
To use LT/GT, insert a date field and the value to compare to. Example: To find all appointments you've had up until a certain date, you can build a search like this:
>LT: >Appt date: [Date object]
If the value you access through PARENT
or PARENT.field
is a date value, you can increment/decrement it using +/-. For example, to find all the tasks due during the next three days on a daily node, write a search like this:
>GT: >Due Date: PARENT
>LT: >Due Date: PARENT+3
Use a date object to find any node that mentions that date as a date object.
A keyword operator that matches any node that mentions that date as a date object.
Insert a date in the YYYY-MM-DD format, like this: FOR DATE 2023-11-21
A keyword operator that matches with calendar nodes.
Is most useful for excluding from searches:
>NOT: IS CALENDAR NODE
A keyword operator that matches children of any #day node
Several search operators will look for nodes with date values within (NUMBER) of days:
DONE LAST (N) DAYS
CREATED LAST (N) DAYS
EDITED LAST (N) DAYS
OVERDUE
+ "Due date" field (legacy)The search operator OVERDUE only works when used in tandem with system field Due date.
We discourage using Due date because system fields in general are very inflexible. They cannot be configured and customized like other user-created fields with default hide state, default value, auto-initialization and so on.
We can now replicate the functionality of OVERDUE for any date field using LT/GT.
For more date-related searches, check this FAQ out.
PARENT
/GRANDPARENT
refers to the immediate ancestors in the outline hierarchy relative to the search node.
If the parent/grandparent is a calendar node, you can add these search operators as a date field value. This will replace the field value with the date represented by the calendar node.
Example: If you create search nodes on your day node, you can use PARENT/GRANDPARENT to fetch all #tasks that are due today (PARENT), or this week (GRANDPARENT)
You can use PARENT+3
/PARENT-3
to find future/past dates relative to the target. See LT/GT for more.
If a node has a date field, you can use PARENT.field to target that field value for date searches. See LT/GT for more.
Add this in the date field value, and it will be replaced with a date that is relative to the current date.
Compare PARENT/GRANDPARENT with FOR RELATIVE DATE, the former let's you look back at what you wrote yesterday relative to the calendar node you're on, whereas the latter shows results relative to today's values (which will change every day), and can be placed anywhere in the graph (not just nested as a child/grandchild of a calendar node).
Accepts the following parameters
Suggested uses:
Unfortunately we don't have a search expression that can be used in a node filter for dates that have a start/end or not.
See Command nodes > Insert relative date for more.
Date fields used in supertags can be made to auto-populate a date upon use. Use a date field in the supertag config, and the following auto-initialize options will be available:
Every node stores a some default system fields that record date/time information based on certain events. This information are not editable, but can be queried.
See any list of nodes plotted in a calendar.
For more, see Views > Table view
Create a search node under a day/week/month to see all captured items from that period.
Use Insert relative date
command, here's an example:
TL;DR: No, create your own date fields.
Background: Early on in Tana's history the team wanted a way to find overdue tasks but there was no current way of searching for nodes with dates relative to a certain date. So, the system field "Due Date" along with the search operator OVERDUE was created specifically this reason.
But since the introduction of LT / GT (less than/greater than) operators, there is no reason to use the system Due Date field, along with the OVERDUE search operator.
A user defined field for Date or Due Date offers more flexibility:
Example of a query to find nodes with a date that is past a certain time:
Source of FAQ: Tana Community Resource Hub
Recently the community discovered a peculiar thing was possible with regards to Calendar/Journal nodes. It was code that was put in a while back when we were thinking about how to revamp the calendar nodes, a project we had to shelf for other priorities. It was code that is the wee beginnings of how to do recurring calendar node templates.
In the Journal node section of your settings, you'll see this:
There's an expression you can use to define intervals of when you want certain supertags applied to certain calendar nodes. It is loosely based on the cron format (opens Wikipedia)
In the field values for defining which supertag to use, you can nest the tags under a cron expression to have it apply only during a certain interval The expression takes on this custom format: DAY-OF-MONTH
MONTH
DAY-OF-WEEK
YEAR
DAY-OF-MONTH
1-31
MONTH
1-12
, or JAN-DEC
DAY-OF-WEEK
MON-SUN
, or 1-7
YEAR
2024
*
(asterisk) represents "every" possible value for that field.?
(question mark) is used to specify "no specific value" and is often used where the day of the month or day of the week should be ignored.,
(comma) is used to separate discreet valuesSpecify the cron expression as a field value, and nest the supertag you want used at that interval.
Specific day of the week:
? * FRI *
= Every FridayOnly weekdays:
? * MON-FRI *
= Every weekdaySpecific date in a month every year:
31 12 * *
= Last day of the yearLast day of any month:
L * ? *
= Last day of the monthEvery day in a specified month:
* 3 * *
= Every day in MarchA specific day of every month:
15 * * *
= The 15th day of every month.Specific days of the week throughout the year:
* * MON,WED,FRI *
= Every Monday, Wednesday, and Friday of every week.First day of each quarter:
1 1,4,7,10 * *
= January 1, April 1, July 1, and October 1.Last weekday of a specific month:
LW * SEP *
= Last weekday of September.Specific day of the week in a specific month:
* 11 FRI *
= Every Friday in November.A day near the end of the month, every month:
L-3 * * *
= The third-to-last day of every month.An annual event on a specific day and month:
14 2 * *
= Every February 14th.First Monday of every month:
1-7 * MON *
= The first Monday that occurs between the 1st and 7th of every month.Specific day of the week, only in certain months:
* JAN,MAR,JUL FRI *
= Every Friday in January, March, and July.A specific day if it is a weekday:
5 * MON-FRI *
= The 5th of the month if it is a weekday.Skipping years for an annual event:
10 10 * * 2023/2
= October 10th, starting in 2023 and every two years thereafter.Note that it will only apply to all new day nodes once the rule is established. It will not apply to existing nodes.
Typically, to insert a date into a node
If you want to convert text to a Tana date object
Source of FAQ: Tana Community Resource Hub
Calendar nodes don't need the day/week/month/year supertags to work, so they come by default without them. It's only necessary to add supertags if you want to use templates for gathering tasks or doing reviews for that time granularity.
To add default tags, go to the node options menu and you should see an option to "Create default day/week/month/year tag". Once it's created, you can rename and customize it like any other supertag.
You can see all the tags you've created for your day/week/month/year nodes by going to Settings > Journaling
Advanced config: How to set up calendar node tags based on specific intervals
For more detail, check out the documentation on the Dates and Calendar nodes page.
Tana doesn't technically have something called "the" calendar.
The question of "how can I do X with the calendar" doesn't really apply because there is no definitive calendar widget as seen in many other apps.
What Tana does have is calendar views, date fields, and daily notes (also called calendar nodes).
You can arrange child nodes in a calendar view defined by the date field you pick in the view, and you can take notes within the daily notes/calendar nodes like a journal. In more detail:
#todo
nodes, found by a search node, might have multiple date fields such as >Created date
, >Due date
, >Date started
, etc. Depending on what you select, the #todo
nodes can appear on the date(s) of any/all of the above date fields.@today
for example). But it is not common to view the calendar nodes in a calendar view, for instance.So, to summarize: there is no such thing as the calendar in Tana. The closest thing would be nodes with date information that are displayed in a calendar view.
Based on a write-up by Navigator Darren Brierton
It depends on what you want to find, the context of the search (which part of the graph it is made in), and the time scale/granularity you are looking for.
Below are possible queries you can use to find date-related things in Tana. A quick legend:
> : Typing this key starts a field anywhere in Tana, so we prefix fields with this sign when writing out queries in text
LT/GT : Less than/Greater than field operators
text
: Text in this style is meant to be written out
FOR RELATIVE DATE today
PARENT.date field
PARENT
/GRANDPARENT
FOR RELATIVE DATE this/last/next week
PARENT.date field
PARENT.date field-7
PARENT
PARENT-7
PARENTS DESCENDANTS
GRANDPARENTS DESCENDANTS
WITH REFS
to include references in the searchX
with a number)CREATED LAST X DAYS
EDITED LAST X DAYS
DONE LAST X DAYS
PARENT.date field
To read about these search operators and more, check out Search Operators
PARENT
in the field value of the Date field of the task.PARENT
/GRANDPARENT
in a date field:-3
or +3
(use any number) to hit a specific date before/after the PARENT
date, respectively. Example: PARENT+3
= Any match on date 3 days from todayGT
/LT
search operators (greater than or less than) together with PARENT
to match a range of dates before/after today. Example: >GT
:PARENT-3
>LT
:PARENT
FOR RELATIVE DATE [term]
as keyword field value for the Date field of the task, and insert today
as the term, without the brackets.