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

Where to get UTC to IST converter in apex?

Asked by David Edmunds May 9, 2023 1.6K views 1 answer
Share

About this question

I am getting this time from api response I need to display it in lightning:formatteddatetime, Sort those records based on date time so am doing this conversion in controller side

code:

string s = string.valueof(a2.get('server_modified'));
DateTime LDate = null;
if(s != null && s != ''){
    s = s.replace('T', ' ');
    s = s.replace('Z', '');
    LDate = DateTime.valueof(s);
}

Your answer

1 Answer

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.