Set the date attribute default to today date

Mark, great explanation above.

Yes, see my Tinderbox Training Video 26 - Daily Journal Time Tracking Project Management Part 1 - #26 by satikusala training, or any of my training since this one (for those interested there is a sample file with this video). You’ll find that I’m now using a “configuration” note, “TBXConfigNote,” in all my files. I use the config note to manage any calculations or lookup values that I think other notes might want to use.

This note has an Edict with the following code:

$DateToday=date("today");
$DateYesterday=date("today- 1 day"); $DateTomorrow=date("today+ 1 days");
$DateThisWeek=date("today+ 5 days");
$DateNextWeekStart=date("today+ 7 days");
$DateNextWeekEnd=date("today+ 14 days");
$DateThisMonth=date("today").month;
$DateThisYear=date("today").year;
$DisplayExpressionCache=$Name+" ("+$ChildCount+")";

In my testing, I’ve found that “today” is equivalent to “now”.

I’m pulling these values in all over the place, but the tracking agents are a good example, for instance the Events Due Today agent uses the following Query:

inside(/Tracking/By Due Date/AllEvents)&($DueDate==$DateToday("TBXConfigNote"))

This Query pulls the argument I want to use for testing the $DueDate against the time now from the config note.

2 Likes