I have added a field called Desired Ship Date on to my email template. when I tested the email template the Desired Ship Date is being shown in the following format "Desired Ship Date: Thu Sep 29 00:00:00 GMT 2016 " but I need it to be displayed in different format like "Desired Ship Date: Thu Sep 29 2016 ". Is there a way I can do it. If yes, Can you let me know how.

  • What type is your email template (HTML or Visualforce)? – dsharrison Oct 3 '16 at 15:55
  • It is a VF template. – user31302 Oct 3 '16 at 16:00

The best bet is to use <apex:outputField /> to display your value. This will use the User's date preferences for formatting. If you cannot use that because you are not working with an sObject, see this: Visualforce Date formatting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy