How to return only the first value in field with multiple values?

43 views
Skip to first unread message

si

unread,
Jul 2, 2019, 6:24:55 PM7/2/19
to TiddlyWiki
I have a field that contains a list of several dates separated by spaces. Is there a way to return only the first date?

TonyM

unread,
Jul 2, 2019, 6:32:23 PM7/2/19
to TiddlyWiki
Si,

Space is a normal delimiter so using the enlist operator should separate each of the dates, and you can use the [[first operator|https://tiddlywiki.com/#first%20Operator]] and other order operators to do this kind of manipulation.

Tony

Mark S.

unread,
Jul 2, 2019, 6:33:54 PM7/2/19
to TiddlyWiki
I'm not sure what you mean by "return", but in a list filter you could have

<$list filter="[enlist{!!dates}nth[1]]"/>

Where "dates" is a field containing your date items. This will only work if your dates are in a format that does not contain space (e.g. something like 2016-02-02)

Good luck
Reply all
Reply to author
Forward
0 new messages