[TW5] Modified field display

84 views
Skip to first unread message

michaelha...@gmail.com

unread,
May 12, 2018, 6:40:20 PM5/12/18
to TiddlyWiki
I am trying to set up a list of tiddlers with the "Modified" field displayed. While I have managed to get that far, I am hoping it is possible to tweak the display slightly.

So instead of displaying something like:

20180512141759481

It would display:

2018-05-12

Or something similar.

I suspect this is actually really simple, but for the life of me I have not been able to figure it out.

Any suggestions would be greatly appreciated.

Thank you.
0 Links

Mark S.

unread,
May 12, 2018, 8:32:50 PM5/12/18
to TiddlyWiki
This should do what you want:

<$view field="modified" format="date" template="YYYY-0MM-0DD"/>

HTH
-- Mark

michaelha...@gmail.com

unread,
May 12, 2018, 8:44:11 PM5/12/18
to tiddl...@googlegroups.com
Perfect! That has done it. Mark, thank you very much.
0 Links

TonyM

unread,
May 14, 2018, 11:47:03 PM5/14/18
to TiddlyWiki
Marks answer leads you to a highly customisable solution.

A Quick alternative is to transclude the datefield(s) as below

{{!!modified}}

{{!!created}}

As I understand it this behaviour of converting the date field to a full date and time string is a "side effect" of other code in the core and it will not work on other date fields.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages