Jon,
12000000 is 12 Noon is is filled out to look as a standard date, Yes, I
found setting it 00 hours is less helpful.
It is a valuable lesson to learn how to apply something to a set of
tiddlers you can aplly to one tiddler;
<$button>
<$list filter="selected all relevant tiddlers">
<$action tiddlers...
</$list>
Button title
</$button>
Clicking the button will apply the action to all the tiddlers inside the
list
Test the following on a copy of your wiki for safety as I do not have the
data set to test
*\define date-yy-mm-dd(date) <$text text={{{
[[20$date$]split[/]join[]addsuffix[120000000]] }}}/>*
<$button>
<$list filter="selected all relevant tiddlers">
* <$wikify name=journal-date text="""<$macrocall $name=date-yy-mm-dd
date={{!!title}}/>""" output=text> <$action-setfield $field=journal-date
$value=<<journal-date>>/> </$wikify>*
</$list>
Button title
</$button>
For safety the following list show which tiddlers the button will change,
make the filters match
<$list filter="selected all relevant tiddlers">
</$list>
The bold text is the same method as my earlier post, it would set a correct
journal-date for all tiddlers with a title *yy-mm-dd*
Feel free to ask more Questions until you have a good solution.
Regards
Tony
On Tuesday, June 9, 2020 at 4:20:05 PM UTC+10, Jon wrote:
>
> Hi Tony,
>
> Thanks for the suggestion, but my skills as they are mean I don't know how
> to apply this for all the records.
>
> The notepad option works really well as I can just copy the date column
> from the spreadsheet (containing 3.5 thousand rows) and paste into Notepad
> ++ and apply the regex to the whole lot and then copy it back into the
> spreadsheet.
>
> That means I can also have one column for the tiddler title eg. 07/06/20
> and another to include the system date.
>
> However, I hadn't twigged that I still need the extra time zeros for the
> date to be recognised as a system date.
>
> So, just to clarify, does 2020-06-07120000000 (i.e. '12' and 7 zeros)
> qualify as the system date?
>
> In which case I can just add this in the regex.
>
> Regards
> Jon
>
> On Tuesday, 9 June 2020 00:56:00 UTC+1, TonyM wrote:
>>
>> Jon,
>>
>> You can apply regex in tiddlywiki, so perhaps you can use your notpad++
>> method?
>>
>> I will suggest once again (forcefully) if you want a global solution,
>> then convert dates to the system date format then you can use $view date to
>> display any format, including the relative date.
>>
>> If your input date is 20/06/07 and its the title of a tiddler, try this
>> on tiddlywiki.com
>>
>> \define cc-date(date) 20$date$
>> \define date-yy-mm-dd(date) <$text text={{{
>> [[20$date$]split[/]join[]addsuffix[120000000]]
>> }}}/>
>>
>>
>> :redate <<cc-date "20/06/07">> quick reformat for appearance
>> :<$macrocall $name=cc-date date={{!!title}}/> using title/field or
>> variable
>> :<<date-yy-mm-dd "20/06/07">> reformat to serial date, also set to 12
>> noon
>>
>>
>> <$wikify name=journal-date text="""<$macrocall $name=date-yy-mm-dd
>> date={{!!title}}/>""" output=text>
>> <$button>
>> <$action-setfield $field=journal-date $value=<<journal-date>>/>
>> set journal date
>> </$button>
>> </$wikify>
>>
>>
>> journal-date=<$view field=journal-date format=date template="YYYY/0MM/0DD"/>
>> or <$view field=journal-date format=relativedate/>
>>
>> Regards
>> Tony
>>
>> On Tuesday, June 9, 2020 at 2:50:55 AM UTC+10, Jon wrote:
>>>
>>> Hi Hubert,
>>>
>>> Thanks for this, which I'll be able to use down the line but at the
>>> moment, I wouldn't know how to apply this globally.
>>>
>>> However, I've managed to find a solution using a text editor like
>>> Notepad ++. Instructions below for anyone else looking for this.
>>>
>>> So, to convert 18/09/10 to 2018-09-10
>>>
>>> Select 'Regular expression' in Search Mode
>>>
>>> 'Find what' ([0-9]{2})/+([0-9]{2})/+([0-9]{2})
>>>
>>> 'Replace with' 20\1-\2-\3
>>>
>>> there's a bit more info. here
>>> <https://stackoverflow.com/questions/4331138/find-and-replace-with-reordered-date-format-in-notepad>
>>>
>>> Thanks
>>> Jon
>>>
>>> On Monday, 8 June 2020 16:22:00 UTC+1, Hubert wrote:
>>>>
>>>> Hi Jon,
>>>>
>>>> You can use this ugly macro below to "convert" any string like this:
>>>> "20/06/07" into this: "2020/06/07", assuming that the earliest year in
>>>> your
>>>> range is the year 2000.
>>>>
>>>> Paste this macro definition in a new tiddler:
>>>>
>>>> \define UpdateDate(date)
>>>> <$vars
>>>> y={{{ [<__date__>split[/]nth[1]add[2000]] }}}
>>>> m={{{ [<__date__>split[/]nth[2]] }}}
>>>> d={{{ [<__date__>split[/]nth[3]] }}}>
>>>> <<y>>/<<m>>/<<d>>
>>>> </$vars>
>>>> \end
>>>>
>>>> And then below that, put your input dates in the macro like this:
>>>>
>>>> <<UpdateDate 20/06/07>>
>>>>
>>>> When you save the tiddler the output will be rendered to this:
>>>> 2020/06/07
>>>>
>>>> You can wrap this macro in a filter to change all dates in one go and
>>>> then simply copy/paste the output.
>>>>
>>>> The whole operation would probably be quicker and simpler using a text
>>>> editor as these are just strings, not to mention that the above macro can
>>>> probably be simplified to a one-liner. Anyway, just something quick.
>>>>
>>>> Regards,
>>>> Hubert
>>>>
>>>
--
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/c1baf90c-ce0a-44aa-96f9-83fdb27033ddo%40googlegroups.com.