最近七天创建的笔记
SELECT
'[' || b.content || '](siyuan://blocks/' || b.id ||')' as __01____pre__文档,
created as __02____datetime__创建时间,
updated as __03____datetime__更新时间
FROM blocks as b
WHERE type = 'd'
AND created >= strftime('%Y%m%d%H%M%S', datetime('now', '-7 days')) -- 最近七天
AND box != '20241028223345-d9ifjv0' -- 不包含dailynote笔记
AND id != '.root{.id}' -- 不包含当前块
ORDER BY created DESC;
最近七天更新的笔记
SELECT
'[' || b.content || '](siyuan://blocks/' || b.id ||')' as __01____pre__文档,
created as __02____datetime__创建时间,
updated as __03____datetime__更新时间
FROM blocks as b
WHERE type = 'd'
AND updated >= strftime('%Y%m%d%H%M%S', datetime('now', '-7 days')) -- 最近七天
AND box != '20241028223345-d9ifjv0' -- 不包含dailynote笔记
AND id != '.root{.id}' -- 不包含当前块
ORDER BY updated DESC;
指定某一天更新的笔记
SELECT
'[' || b.content || '](siyuan://blocks/' || b.id ||')' as __01____pre__文档,
created as __02____datetime__创建时间,
updated as __03____datetime__更新时间
FROM blocks as b
WHERE type = 'd'
AND (created BETWEEN '20241014' AND '20241015' OR updated BETWEEN '20241014' AND '20241015') -- 指定某一天
AND box != '20241028223345-d9ifjv0' -- 不包含dailynote笔记
AND id != '.root{.id}' -- 不包含当前块
ORDER BY updated DESC;
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于