Message Boards
DXP 7.2 ADT - How to get updated date for custom document type?
John Cressman, modified 2 Years ago.
DXP 7.2 ADT - How to get updated date for custom document type?
Junior Member Posts: 39 Join Date: 8/15/17 Recent PostsIn an ADT using Freemaker in an asset publisher, how can I retrieve the equivalent of the last modified date for the custom document and then display it in a readable format (ie. MM-DD-YYYY)
Thank you!
Mohammed Yasin, modified 2 Years ago.
RE: DXP 7.2 ADT - How to get updated date for custom document type?
Liferay Master Posts: 591 Join Date: 8/8/14 Recent PostsHi,
In ADT all elements being displayed are assets, hence their title, created date, modified date , .. etc will be available in asset entry object itself.
You can try below code in your ADT to display last modified date in required format.
<#assign dateFormat = "MM-dd-yyyy" />
<#if entries?has_content>
<#list entries as curEntry>
${curEntry.getTitle(locale)}<br/>
${dateUtil.getDate(curEntry.getModifiedDate(), dateFormat, locale)}
</#list>
</#if>