<% tp.file.creation_date() %> doesnt work


I tried to use template date

but the it seems that it doesnt work…

I tried to change title such as 2024-01-30 or I change the order such as 01-03-2024

but it doesnt work

it keeps telling me

like that

i dont know how to fix it

could you help me out?

If this is a template that is being inserted when the file is created then you can change the date property to <% tp.date.now() %>, which might help solve your problem.

Additionally, the format that you pass to the moment parser might do better as <% moment(tp.file.title, 'YYYY-MM-DD-dddd').format("dddd, MMMM DD, YYYY") %> (notice the -dddd added to the end of the title format.

Haven’t tested any of this, but that’s what I see on first glance.

1 Like