Mark, thanks for feedback.
The added 'published-tw' field is empty - no values:
[image: published-tw.png]
Mark S. schrieb am Montag, 16. August 2021 um 20:31:28 UTC+2:
> So what you really need is a filter operator that can do the conversion
> and be used inside a sortsub operator. @Eric ?
>
> If you're willing to use an "update" button, one solution would be a
> button that creates "published-tw" (date in TW format) fields for any
> tiddler that has a "published" field. Then you could have the TOC sort on
> the published-tw field. You would have to remember to periodically perform
> the "update" whenever you had data changes. This two-step approach makes
> certain activities in TW much easier to handle.
>
> So the code to update the field might look like:
>
> <$button>Update Publication Dates
> <$list filter="[has[published]]">
> <$wikify text="""<$macrocall $name=convertdate from={{!!published}}
> to="[UTC]YYYY0MM0DD0hh0mm0ss0XXX" />""" name=result >
> <$action-setfield $field=published-tw $value=<<result>> />
> </$wikify>
> </$list>
> </$button>
>
> Be sure to make a backup before trying this of course. Also, this assumes
> that you have the latest version of Eric's converdate macro installed.
>
>
> On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:
>
>> Hello,
>>
>> thanks for all input and effort.
>> It looks like it is not so easy...
>>
>> As I wrote, I use the text field ‘publish’ to add a date. (date modified
>> or created will not help me)
>>
>> This date can also be in the future.
>> Format is *T. MMMM JJJJ* - (eg. *7. April 2021* or *13. August 2021*) –
>> this is the long date in German (like "DDth MMM YYYY")
>>
>> 'published' is also shown in TOC:
>>
>> [image: TOC.png]
>>
>> Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.
>>
>> The output should still be "DDth MMM YYYY"
>>
>> Thanks
>> Stefan
>> Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:
>>
>>> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>>>
>>>> Just tried
>>>> <<convertdate from:"7. April 2021" to:"[UTC]YYYY0MM0DD0hh0mm0ss0XXX">>
>>>> and got a hard RSOE ("from" not defined). I think the arguments need to
>>>> be tweaked in the macro.
>>>>
>>>
>>> OOPS! I had originally used "date" and "format" as the parameter names,
>>> but then I decided to change to using "from" and "to". Unfortunately, the
>>> arguments in the macro function declaration were still using "date" and
>>> "format", but internally, the macro code referenced "from" and "to" as
>>> intended. I've corrected the arguments in the macro function declaration
>>> and posted an update here:
>>>
>>> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>>>
>>> Thanks,
>>> -e
>>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/d90afcff-2aad-4979-9fb3-73e39660e4e3n%40googlegroups.com.