Hi. I’m wondering if there is a way to edit the creation date for a tiddler (without going into the source code). I have imported a lot of material from a different system, and I brought over the creation date in that context as a custom field: “originally-posted”. Now I’d like to go through and make the official creation date of the tiddler match that field.
Is that possible, or would it be better for me to reimport the data?
What is the format of your originally-posted field contents? Is it a tiddlywiki native date field format (20221105152235000) or a custom one like 2022-11-05 3:22pm?
You can use the standard tiddler editor to change the created or modified date of any tiddler.
To change a created date:
Edit the desired tiddler
In the “add new field, field name” input, enter “created” (even though that field clearly already exists!)
In the “add new field, field value” input, enter the new datetime stamp using a UTC value with format YYYYMMDDhhmmssXXX
Press “done” to complete the tiddler changes
To change a modified date:
From the Sidebar Tools tab, turn off “Timestamps” (This is needed so that modifying the tiddler’s modification date doesn’t get overwritten when the tiddler edit is completed!)
Edit the desired tiddler
In the “add new field, field name” input, enter “modified” (even though that field clearly already exists!)
In the “add new field, field value” input, enter the new datetime stamp using a UTC value with format YYYYMMDDhhmmssXXX
Press “done” to complete the tiddler changes
Notes:
By default, both the created and modified fields are NOT displayed in the tiddler editor, even when the fields do exist.
You can display the Tiddler Info (from the tiddler’s “more” menu) to view ALL the tiddler’s field values including the created and modified fields.
Note that, if you create a new tiddler while the Timestamps are OFF, then it will not have a created or modified field. This is also the case for most of the TWCore Shadow tiddlers, which also lack these fields.
I would create a filter that lists all the tiddlers you want to change then a button that contains the same list forming an list of action set field widgets for each tiddler of the form (not tested). <$action-setfield $field="created" $value={{!!input-created}} />
where input-created is the imported date
An interesting fact is the same list field can be used to view the items to be changed and action the change, depending on if it is inside a button to trigger the actions. This resulted in me publishing this;
Particularly useful in one of or data transformation and cleaning.
This would be the way I would recommend it. If you have a tiddler that already has the same date/time as what you want to set, you don’t have to convert it to UTC, you can just copy/paste it usning the following steps (provided by the ever wise mr. shulman.)
But for your specific date, if you don’t care about the time, you could just do 20111231000000000 (I think that is the right amount of zeros, sometimes things blur together for me, please excuse that if it is incorrect.)
One trick is to add 12 hours as ± 12 hours is still the same day 20111231000000000 YYYYMMDDhhmmssXXX 20111231120000000 <<now [UTC]YYYY0MM0DD0hh0mm0ss0XXX>>