+ 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>