Need to insert static date in frontmatter

What I’m trying to do

Hello all! I am trying to set up a creation date, and a “last modified” date in my Zotero literature note frontmatter. I need the creation date to be static from the first import, and the modified date to change with each new import.

Things I have tried

I know the following YAML code will get me a dynamic date that changes with each import for the modified date, but the static “created” date does not seem to work.

---
created: {% if isFirstImport %}{{date | format ("YYYY-MM-DD hh:mm:ss A")}}{% endif %}
last modified: {{date | format ("YYYY-MM-DD hh:mm:ss A")}}
---

I was able to figure this out by using a “persist” command in the frontmatter. The only issue with the solution is that if there is another persisted date in the document, it appears to copy into the frontmatter for some reason, throwing an error. I simply removed the persist in the note body, and it’s given me a workable solution for the time being.