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
Raghu.2020Raghu.2020 

formatting datetime in lwc

Hi,

I would like to format standard custom field 'createddate' into the below format and display in my LWC component.

 User-added image
Best Answer chosen by Raghu.2020
David Zhu 🔥David Zhu 🔥
You may try this:

<lightning-formatted-date-time value={createdDate} year="numeric" month="numeric" day="numeric" hour="2-digit"
                                        minute="2-digit" hour12="true" ></lightning-formatted-date-time>