User Input date into Email

Hi Everyone :slightly_smiling_face:

I am trying to add a date to an email but to no avail? I have added a date variable to the Prompt for User Input option and then added that variable into my email. When the macro is run the date is selected but not shown correct in the email? Also I want the initial date to be 01/01/2021 but cannot seem to work out how to change the fields?

Thank's in advance for any help.

Date into email.kmmacros (2.4 KB)

According to the wiki, The date and time fields are in unix time.[]=prompt#:~:text=a%20calculation%20field.-,Date%20and%20Time%20Fields,This%20default%20value%20field%20is%20a%20calculation%20field.,-Labels

You'll need to convert from unix time to whatever format you'd like using the ICUDateTimeFor token. You can also just either use the "Now()" token or specify a unix time for the prompt default value like so:

Prompt for User Input.kmmacros (2.4 KB)

1 Like

Works perfectly. Thank you very much for your help.

1 Like