How can I view and change the metadata on a tiddler in tiddlywiki - eg I want to change…
- User
How can I view and change the metadata on a tiddler in tiddlywiki - eg I want to change the creation date of a tiddler
Assistant
To view and change metadata on a tiddler in TiddlyWiki, you can:
-
View metadata by clicking the info button (ℹ️) on any tiddler, which shows creation date, modification date, tags, and other fields
-
Change metadata directly by editing the tiddler in "advanced mode":
- Click the edit button on the tiddler
- Click the "Fields" tab or button (sometimes shown as a gear icon)
- Find the "created" field and modify its value (format: YYYYMMDDHHMMSSXXX)
Alternatively, you can use the Fields tab in the sidebar (if enabled) or create a special tiddler that modifies another tiddler's fields.
Would you like me to explain the date format in more detail or provide specific steps for your TiddlyWiki version?
-
- User
Those fields don't show there
Assistant
If you're not seeing the fields in the usual places, here are some alternative approaches:
-
Try using the "More" dropdown menu when editing a tiddler - sometimes the fields option is hidden there
-
You can directly edit a tiddler's JSON by:
- Right-clicking on a tiddler's title and selecting "Open" or "Permalink"
- Adding "?raw=true" to the end of the URL
- This shows the raw JSON where you can edit the "created" field
-
Use TiddlyWiki's developer tools:
- Press F12 to open browser developer tools
- In the console, type:
$tw.wiki.getTiddler("YourTiddlerTitle").fields.created = "20250101000000000" - Then:
$tw.wiki.saveTiddler($tw.wiki.getTiddler("YourTiddlerTitle"))
Which TiddlyWiki version are you using? The interface can vary significantly between versions.
-
- User
Under more and info there's a fields tab which shows created and modified fields. But I cant edit them
Assistant
You're right - in most TiddlyWiki setups, the fields shown in the info panel are read-only.
To edit the creation date, try this approach:
- Create a temporary tiddler with this content:
\define setCreated() <$action-setfield $tiddler="YourTiddlerTitle" created="20250101000000000"/> \end <$button actions=<<setCreated>>>Update Creation Date</$button>- Replace "YourTiddlerTitle" with your actual tiddler name
- Replace "20250101000000000" with your desired date (format: YYYYMMDDHHMMSSXXX)
- Save and view this temporary tiddler
- Click the button to update the creation date
Alternatively, if you have the TiddlyWiki command line edition, you can modify the .tid files directly in a text editor before loading the wiki.
Would you like me to explain how to format the date value correctly?
- User
How create a tiddler with two buttons and an edit box, the edit box specifies the tiddler, and the buttons add or subtract one from the creation date day
Assistant
Here's a tiddler that will do exactly what you want:
\define adjustCreationDate(adjustment) <$let targetTiddler={{!!temp_tiddler_name}} currentDate={{{ [<targetTiddler>get[created]] }}} newDate={{{ [<currentDate>split[]first[8]join[]]add<adjustment>pad[8]0 +[join[]] [<currentDate>split[]rest[8]join[]] +[join[]] }}}> <$action-setfield $tiddler=<<targetTiddler>> created=<<newDate>>/> </$let> \end <div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <div style="margin: 1em 0;"> <$button actions=<<adjustCreationDate "-1">>> Subtract One Day </$button> <$button actions=<<adjustCreationDate "1">>> Add One Day </$button> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <div style="margin-top: 1em;"> Current creation date of "<$text text={{!!temp_tiddler_name}}/>" is: <$text text={{{ [{!!temp_tiddler_name}get[created]split[]first[8]join[]format:date[YYYY-MM-DD]] }}}/> </div> </$list>Create a new tiddler with this content. When you view it:
- Type the name of the tiddler you want to modify in the text box
- Click "Subtract One Day" to move the creation date back one day
- Click "Add One Day" to move the creation date forward one day
The tiddler will also show the current creation date in a readable format once you enter a valid tiddler name.
Would you like me to explain how this code works?
- User
Doens't work at all
Assistant
I'm sorry it didn't work. Let's try a simpler approach that should be more reliable:
\define adjustDate(tiddlerName, adjustment) <$let currentDate={{{ [<tiddlerName>get[created]] }}} year={{{ [<currentDate>substring[0,4]] }}} month={{{ [<currentDate>substring[4,6]] }}} day={{{ [<currentDate>substring[6,8]] }}} rest={{{ [<currentDate>substring[8]] }}} newDate={{{ [<year>addsuffix[-]addsuffix<month>addsuffix[-]addsuffix<day>] }}} jsDate={{{ [<newDate>format:date[0-YYYY-0MM-0DD]] }}} adjustedDate={{{ [<jsDate>format:date[0-YYYY-0MM-0DD]] }}} > <$wikify name="result" text="""<$macrocall $name="now" format="YYYYMMDDHHmmssSSS" offset="""$(adjustment)$d""" base="""$(currentDate)$""" />"""> <$action-setfield $tiddler=<<tiddlerName>> created=<<result>>/> </$wikify> </$let> \end <div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <div style="margin: 1em 0;"> <$button actions=<<adjustDate {{!!temp_tiddler_name}} "-1">>> Subtract One Day </$button> <$button actions=<<adjustDate {{!!temp_tiddler_name}} "1">>> Add One Day </$button> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <div style="margin-top: 1em;"> Current creation date: <$view tiddler={{!!temp_tiddler_name}} field="created" format="date" template="YYYY-MM-DD"/> </div> </$list>If this still doesn't work, let's try an even simpler approach:
<div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <div style="margin: 1em 0;"> <$button> Subtract One Day <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="targetTiddler"> <$wikify name="newDate" text="""<$macrocall $name="now" format="YYYYMMDDHHmmssSSS" offset="-1d" base={{{ [<targetTiddler>get[created]] }}} />"""> <$action-setfield $tiddler={{!!temp_tiddler_name}} created=<<newDate>>/> </$wikify> </$list> </$button> <$button> Add One Day <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="targetTiddler"> <$wikify name="newDate" text="""<$macrocall $name="now" format="YYYYMMDDHHmmssSSS" offset="+1d" base={{{ [<targetTiddler>get[created]] }}} />"""> <$action-setfield $tiddler={{!!temp_tiddler_name}} created=<<newDate>>/> </$wikify> </$list> </$button> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <div style="margin-top: 1em;"> Current creation date: <$view tiddler={{!!temp_tiddler_name}} field="created" format="date" template="YYYY-MM-DD"/> </div> </$list>Which TiddlyWiki version are you using? That would help me provide a solution that works for your specific setup.
- User
Nope. Maybe make the button "update" and then put the current creation date in an editable field
Assistant
Let's try this simpler approach with an editable date field:
<div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <div style="margin: 1em 0;"> <label>Creation date (YYYYMMDDHHmmssSSS): </label> <$edit-text field="temp_creation_date" default={{{ [{!!temp_tiddler_name}get[created]] }}}/> </div> <div style="margin: 1em 0;"> <$button> Update Creation Date <$action-setfield $tiddler={{!!temp_tiddler_name}} created={{!!temp_creation_date}}/> </$button> </div> <div style="margin-top: 1em;"> Current creation date: <$view tiddler={{!!temp_tiddler_name}} field="created" format="date" template="YYYY-MM-DD HH:mm:ss"/> </div> </$list>This tiddler will:
- Let you enter a tiddler name
- Show the current creation date in an editable field
- Let you modify the date directly
- Update the tiddler when you click the button
The format needs to be YYYYMMDDHHmmssSSS (e.g., 20250512123045678). You can edit this directly to change the day or any other part of the timestamp.
- User
But it also has to read the date from whatever it currently is to pre-populate the field
Assistant
You're right - the code I provided should already do that with this line:
<$edit-text field="temp_creation_date" default={{{ [{!!temp_tiddler_name}get[created]] }}}/>But let's make a more robust version that ensures it always shows the current value:
<div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <$set name="currentCreated" value={{{ [{!!temp_tiddler_name}get[created]] }}}> <$list filter="[<currentCreated>!match{!!temp_creation_date}]" emptyMessage=""" <div style="margin: 1em 0;"> <label>Creation date (YYYYMMDDHHmmssSSS): </label> <$edit-text field="temp_creation_date" default=<<currentCreated>>/> </div> """> <$action-setfield $field="temp_creation_date" $value=<<currentCreated>>/> <div style="margin: 1em 0;"> <label>Creation date (YYYYMMDDHHmmssSSS): </label> <$edit-text field="temp_creation_date"/> </div> </$list> <div style="margin: 1em 0;"> <$button> Update Creation Date <$action-setfield $tiddler={{!!temp_tiddler_name}} created={{!!temp_creation_date}}/> </$button> </div> <div style="margin-top: 1em;"> Current creation date: <$view tiddler={{!!temp_tiddler_name}} field="created" format="date" template="YYYY-MM-DD HH:mm:ss"/> </div> </$set> </$list>This version will:
- Read the current creation date when you enter a tiddler name
- Automatically update the edit field with the current value
- Allow you to edit the date
- Update the tiddler when you click the button
If this still doesn't work, please let me know which version of TiddlyWiki you're using so I can provide a solution specific to your version.
- User
New Tiddler 3 12th May 2025 at 10:12am
Tiddler name:
Creation date (YYYYMMDDHHmmssSSS): 20250505075314550 Current creation date: 2025-5-5 HH:53:14
Assistant
It looks like the date is displaying correctly in the editable field, but there's an issue with the display format at the bottom. Let's fix that:
<div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <$set name="currentCreated" value={{{ [{!!temp_tiddler_name}get[created]] }}}> <div style="margin: 1em 0;"> <label>Creation date (YYYYMMDDHHmmssSSS): </label> <$edit-text field="temp_creation_date" default=<<currentCreated>>/> </div> <div style="margin: 1em 0;"> <$button> Update Creation Date <$action-setfield $tiddler={{!!temp_tiddler_name}} created={{!!temp_creation_date}}/> </$button> </div> <div style="margin-top: 1em;"> Current creation date: <$view tiddler={{!!temp_tiddler_name}} field="created" format="date" template="YYYY-MM-DD HH:mm:ss"/> </div> </$set> </$list>This simplified version should:
- Show the tiddler name input
- Display the current creation date in an editable field when you enter a tiddler name
- Let you update the date with the button
- Show the formatted date below
The issue with "HH:53:14" in your screenshot suggests the template isn't being properly processed. This version should fix that by using a simpler approach.
- User
Nope still not
Assistant
Let's try a completely different approach using JavaScript directly:
<div style="margin: 1em 0;"> <label>Tiddler name: </label> <$edit-text field="temp_tiddler_name" placeholder="Enter tiddler title"/> </div> <$list filter="[{!!temp_tiddler_name}!is[blank]]" variable="dummy"> <$set name="currentCreated" value={{{ [{!!temp_tiddler_name}get[created]] }}}> <div style="margin: 1em 0;"> <label>Creation date (YYYYMMDDHHmmssSSS): </label> <$edit-text field="temp_creation_date" default=<<currentCreated>>/> </div> </$set> <div style="margin: 1em 0;"> <$button> Update Creation Date <$action-javascript> var tiddler = this.wiki.getTiddler(this.getVariable("temp_tiddler_name")); if(tiddler) { var fields = Object.assign({}, tiddler.fields); fields.created = this.getVariable("temp_creation_date"); this.wiki.addTiddler(new $tw.Tiddler(fields)); } </$action-javascript> </$button> </div> <div style="margin-top: 1em;"> Current creation date: <$text text={{{ [{!!temp_tiddler_name}get[created]split[]first[4]join[]addsuffix[-]addsuffix[{[{!!temp_tiddler_name}get[created]substring[4,6]]}]addsuffix[-]addsuffix[{[{!!temp_tiddler_name}get[created]substring[6,8]]}]] }}}/> at <$text text={{{ [{!!temp_tiddler_name}get[created]substring[8,10]addsuffix[:]addsuffix[{[{!!temp_tiddler_name}get[created]substring[10,12]]}]addsuffix[:]addsuffix[{[{!!temp_tiddler_name}get[created]substring[12,14]]}]] }}}/> </div> </$list>This version:
- Uses JavaScript to directly update the tiddler's created field
- Manually formats the date display using text manipulation
- Should be compatible with most TiddlyWiki versions
If this still doesn't work, you might need to try a plugin like "Edit All Tiddler Fields" which adds a UI for editing all fields, or consider using the TiddlyWiki command line to directly edit the .tid files.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.