SOLVED: Tips for adding DATE properties via templater script

What I’m trying to do

create a DATE property using a templater script.
I struggled to get this to work and find any guidance on how to do this.

EXAMPLE script

let room = await tp.system.prompt(“Room?”)
await tp.file.move(“/1 Projects/” + room);
tR += “—”

creationDate: <% %>
ReadyDate: 2024-06-01 <<< FAILS even though it is correct date format

Things I have tested

Date: <% %> ### Creates a Date property
ReadyDate: 2024-06-01 *### Does NOT Creates a Date property. Creates a TEXT entry

What worked and I could not find documented was this format YYYY-MM-DD HH:mm:ss NOT YYYY-MM-DD

ReadyDate: 2024-06-01 12:00:00 ### Creates a Date property

<<< You need to add the HOURS for Properties to realise it is a date format >>>

(Quoting the edit to the original post so it can be marked as the solution.)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.