I set up my weekly planning workflow in SiYuan and thought I might share in case it is useful for others
Setup for the plan
First I set up a horizontal Super block with the week days and additional vertical superblocks on each day that contains the list of tasks/appointments (mostly links to existing things)
Query the current day
When I look at my plan during a workday I just want to see the current day. I could not get strftime
to work to get the day of the week but the following query works. The ids are the ids of the weekday headings created in the previous step. Since the first of January of 2024 was a monday we can calculate the remainder of the difference to the current day divided by 7 to get the weekday in numeric form (starting at 0). Note that any other past monday would also work. On saturdays and sundays it selects the "This Week" heading to show the entire week.
WITH d AS (
SELECT (julianday('now') - julianday('2024-01-01')) % 7 AS wday
)
SELECT *
FROM blocks
WHERE id = CASE
WHEN (select wday from d) = 0 THEN '20240107122404-u8tdpt6' -- Monday
WHEN (select wday from d) = 1 THEN '20240107122406-cz6a3hd' -- Tuesday
WHEN (select wday from d) = 2 THEN '20240102190549-g9itk7q' -- Wednesday
WHEN (select wday from d) = 3 THEN '20240102190247-h4e9cvv' -- Thursday
WHEN (select wday from d) = 4 THEN '20240102190224-ey38w2x' -- Friday
ELSE '20240101005231-68jp7kf' -- Show all
END
Result for Monday:
Hope that this is useful to someone. :)
Welcome to here!
Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.
Signup About