You need to sign in to do that
Don't have an account?
Manish.Singh
Set Datetime format of Lightning:input datetime
Hello everyone,
Can anyone tell me, How I exactly show the date-time selected in the lightning input datetime field as a formatted string?
My Output:
Code that i used to format
$A.localizationService.formatDate(string datetime,"MMM dd yyyy, hh:mm:ss a");
I want to show exactly the selected date/time as a formatted string in the output.
Thanks
Can anyone tell me, How I exactly show the date-time selected in the lightning input datetime field as a formatted string?
My Output:
Code that i used to format
$A.localizationService.formatDate(string datetime,"MMM dd yyyy, hh:mm:ss a");
I want to show exactly the selected date/time as a formatted string in the output.
Thanks
Hi Manish,
Kindly refer this link :-
https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedDateTime/example
If it helps you, please mark it as best answer.
Regads,
Priya Ranjan
Greetings!
You can use lightning:formattedDateTime tag in the Aura component to display date time in different formats.
for refer-> https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedDateTime/example#lightningcomponentdemo:exampleDateTimeFormatting
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi