Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How can I format datetime Salesforce?

Asked by Aashna Saito Sep 22, 2022 1.3K views 2 answers
Share

About this question

Using Apex, how can I format a Datetime variable the same way it is displayed in SOQL results? It seems that SOQL uses the UTC format. When I run the following query

SELECT Created Date FROM Account

I get the following datetime format:

2017-01-10T14:53:55.000+0000


Your answer

2 Answers

Constanceareep Latest answer

Answered on Jun 30, 2025

Wow, I admire the source of information that provides detailed usage of Apex like in tap road also makes you utilize proficient strategy every time you move to overcome obstacles.

Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.