Activity › Forums › Salesforce® Discussions › What does format() function does in Salesforce? Salesforce® Discussions What does format() function does in Salesforce? Posted by Anjali on July 9, 2020 at 12:12 PM What does format() function does in Salesforce? Marziya replied 5 years, 10 months ago 3 Members · 2 Replies 2 Replies Deepak Member July 9, 2020 at 1:03 PM Use FORMAT with the SELECT clause to apply localized formatting to standard and custom number, date, time, and currency fields. When the FORMAT function is applied these fields reflect the appropriate format for the given user locale. [adinserter block='9'] Marziya Member July 9, 2020 at 1:17 PM private String formatDate(Date dateIn){ DateTime dateTimeScheduled = DateTime.newInstance(dateIn,Time.newInstance(0,0,0,0)); return dateTimeScheduled.format(‘MMMM d, yyyy’); } Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me