will.good Posted August 13, 2024 Posted August 13, 2024 Hi, Not sure if this is a bug or not... We are referencing custom field 21 in an email template, and want to format it dd/mm/yyyy HH:MM (ideally without the time, so it is just the date, but I dont think this is possible) Below is a screenshot of how I have tried this in an email template and neither seem to be working? This is how it appears in the email Reviewing the documentation here Email Templates (hornbill.com), we should just be able to use {{.datetimefield|formatLocalTime}}? I have checked both system.RegionalSettings.timezone & system.RegionalSettings.dateTimeFormat and these are set corrently. Where are we going wrong?
James Ainsworth Posted August 13, 2024 Posted August 13, 2024 Hi @will.good Thanks for your post. I've tested this using the Email Action on a request using an associated template. On the email template, the format {{.H_custom_21|formatLocalTime}} was used. As part of this test, I also changed the format defined in the setting system.regionalSettings.dateTimeFormat. I can change the format to something else and simply toggling between the Email Action to another action and back again, shows the new updated format. From your post it does appear that you are using the correct format on the email template. Are you able to test using the Email Action? However, this still won't provide a solution for displaying a date without time. You may be able to use the Hornbill Automation Date Formatter to create the format you would like to use, but this would most likely need to be stored as a string in a custom field that supports strings.
will.good Posted August 13, 2024 Author Posted August 13, 2024 Thanks @James Ainsworth This is now working after i have changed the datetime format settings to something else and then changed them back...strange! Cheers
James Ainsworth Posted August 13, 2024 Posted August 13, 2024 Pleased to hear that it is now working.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now