72. How to get the standard UK format of DD/MM/YYYY for date fields in templates?
Dates can be stored in various formats in the Salesforce org according to the user’s preference & country. Though you see the date in your preferred format, it will be fetched with the code in the standard format of “YYYY-MM-DD” only (it gets automatically converted to the above-mentioned format and cannot be changed).
However, there is a solution for accessing the date field in the preferred format in SMS Template.
Create a new formula field, of type Text, on the same object.The Formula value should be –
TEXT( DAY(Date Field)) & “/” & TEXT(MONTH(Date Field)) & “/”& TEXT(YEAR(Date Field)).
This field will store the text version of Date Field in dd/mm/yyyy format. You can use this formula field in SMS Template in place of the Date field and view results as per your requirement.