How to show last update date formatted

Chris_ May 18, 2018

Hey all,

I want to show the 'last update' date in a table.

Therefore I created a user macro:

$action.dateFormatter.formatDateTime($content.getLastModificationDate())

 This works, but now I want to format this date. I tried:

$action.dateFormatter.formatDateTime("dd-MMM-yyyy", $content.getLastModificationDate())

 but this is not working. Any hints?

 

Thanks in advance.

1 answer

1 accepted

2 votes
Answer accepted
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2018

Hi Christian,

this should work:

$action.dateFormatter.formatGivenString("dd-MMM-yyyy", $content.getLastModificationDate())
Chris_ May 18, 2018

Works like a charm, thanks!

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2018

You're welcome, @Chris_

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events