Hello -
I would like to create a new Template for note taking that includes a document creation date & time stamp (i.e. a date that does not change). Is there a command that can be used to automatically do this within the template?
Thank You.
Hello -
I would like to create a new Template for note taking that includes a document creation date & time stamp (i.e. a date that does not change). Is there a command that can be used to automatically do this within the template?
Thank You.
Welcome @Border27
Are you referring to a date and time stamp in the document’s contents?
Yes. When I create a doc, id like there to be a date/time stamp in the footer - of the date/time created.
I know this info is in the metadata.
I have searched the Community, but could not find the answer.
Thanks!
Wait for Jim’s answer, because I don’t know enough about the possibilities offered by templates in DT. But assuming you can’t do this via the template, you could set up a script in the toolbar which creates a new RTF document, and adds the appropriate data as content. I don’t think it would be possible to add it to the footer, though (do RTFs have defined footers?); but it could be added as the first line. If you wanted, the script could even ask for the title of the document and add that as the first line followed by the creation date & time.
It’s easily done with placeholders.
%hour%
.Jim -
That is just great - solves my question. Thank you.
If I may ask one more question - is there a place where I can find all of the options for inserting items like date & time in an RTF? Like 12 hour time format. Items the follow the % item % format.
Thank you!
Page 226 of the manual is a good place to start.
Stephen
Stephen,
Yes, thank you for the reference to the manual,
My last question was related to the syntax used for the placeholders. For example:
%date% gets met April 18, 2021. But, what is the syntax to get 04/18/21?
Similarly, %hour% gets me a number between 1-24. How would I get a 12 hour version of this?
I’m looking for a library, list or cheat sheet with all of the % ____ % strings?
Hope that makes sense.
Thanks You!
For a specific date type, you can use the individual date placeholders, e.g., day/month/year
, though that will not yield a 2 digit year.
There is a list in the Help > Documentation > Automation > Smart Templates section. This also has information on creating your own placeholders and using them via AppleScript in a smart template.
You’re welcome