function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shuhbam SinhaShuhbam Sinha 

how to remove time zone from LWC component

Hello Everyone, 

I have one requirement where i need to show one field's value to my lwc component and that field is Date&Time. When I am using this field in my lwc component it is coming as UTC time zone like 2023-01-22T11:37:00.000Z instead of user time zone. How to make it correct. Please find the below code where i am fetching the details : -

import CASE_CLOSE_SLA from '@salesforce/schema/Case.Overall_Case_Closure_SLA__c';

 @wire(getRecord, { recordId: '$recordId', fields })
    caseObj;

  
   get slaDate() {
        return getFieldValue(this.caseObj.data, CASE_CLOSE_SLA_Formattted);
    }
Please help me in resolving this issue.thanks in advance
VinayVinay (Salesforce Developers) 
Hi Shuhbam,

Check below reference that can help you.

https://salesforce.stackexchange.com/questions/157597/remove-timezone-conversion-from-the-value-of-uiinputdatetime

Thanks,