Adding timestamp to Notes and need assistance with the format

I converted my json Packer template to hcl2 and I realize I can still use the legacy way to add a time stamp, but I have been trying to use the new way, but am confused on the syntax. Here is the converted line from the json with the legacy syntax. Can anyone help me understand how to get the same result with the timestamp and formatdate functions?

notes = “Packer Template Updated - ${legacy_isotime(“01-02-2006”)}”

I believe you want ${formatdate("MM-DD-YYYY", timestamp())}

1 Like

Thank you so much!! I knew it was something simple I was messing up I left out one ) and was lost thinking I was doing it all wrong. for whatever reason, seeing your syntax made total sense to me and showed me that A. I missed the closing ) and B. Maybe I should slow down and read the output, as Packer is pretty good about pointing you in the right direction of your mistake.

I really appreciate the help!!!

Been there, friend! Glad I could help.