modify a String

57 views
Skip to first unread message

Gerald Weis

unread,
Mar 22, 2020, 10:10:30 AM3/22/20
to TiddlyWiki
Hallo all

my first problem to cut  a String is solved.


{{{ [<currentTiddler>removeprefix[Software: ]] }}}

Now i must the string modify

the Original string from the filter is in the format 2019-11-30 (YYYY-MM-DD)

Now i need it in the format 30.11.2019 (DD.MM.YYYY)

thats an problem for me - thlen my english is very ill.

thanks for ideas



Mark S.

unread,
Mar 22, 2020, 12:58:47 PM3/22/20
to TiddlyWiki


{{{ [<currentTiddler>split[-]join[.]] }}}


Eric Shulman

unread,
Mar 22, 2020, 1:15:47 PM3/22/20
to TiddlyWiki

On Sunday, March 22, 2020 at 9:58:47 AM UTC-7, Mark S. wrote:
{{{ [<currentTiddler>split[-]join[.]] }}}

On Sunday, March 22, 2020 at 7:10:30 AM UTC-7, Gerald Weis wrote:
the Original string from the filter is in the format 2019-11-30 (YYYY-MM-DD)
Now i need it in the format 30.11.2019 (DD.MM.YYYY)

@Mark... almost all the way there... but you left out changing the order of the numbers.

Add a reverse[] filter, like this:

{{{ [<currentTiddler>split[-]reverse[]join[.]] }}}

-e

Mohammad Rahmani

unread,
Mar 23, 2020, 1:49:10 AM3/23/20
to tiddl...@googlegroups.com
Added to TW-Scripts


Best wishes
Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d5c2adde-7714-42b8-a7d5-006a33eb6ee9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages