AEM 6.3 Date format, i have created the below HTL
<h2>${ 'MM/dd/yyyy HH:mma' @ format=pageProperties.cq:lastReplicated}</h2>
its provide the output as "<h2>03/07/2018 20:08PM</h2>"
I have requirement to change the PM as pm, likewise AM as am (Lowercase). Is that acheivable using HTL?
Solved! Go to Solution.
HI michaelvino86
You can use
To directly formet the date after AEM6.2.
You can parse the string and change the case using custom logic.
Do you want me to use java or javascript to parse the string? i was thinking like, for a small change is that required to create a use-API.
I am looking for a solution from HTL itself. Correct me if i am wrong.
This is standard JS functionality -- JavaScript String toLowerCase() Method
To learn how to use JS API for HTL -- see this HELPX Article -- Creating a Tab layout component for Adobe Experience Manager
The use case here is a tab-based HTL component - but it shows use of the JS API for HTL. We have articles too for WCMUSePojo and Sling Models.
Yes, Scott is right.
You can simply parse using Java Script as given in link: JavaScript String toLowerCase() Method
Could you please provide the code snippet.
See the links provided in this thread to see how to use JS to lower case a string.
HI michaelvino86
You can use
To directly formet the date after AEM6.2.
Views
Likes
Replies