How to include current date and time by macro in the conflunce page? Any possiblities..?
use the dateFormatter's formatGivenString() method to specify a format:
$action.dateFormatter.formatGivenString("dd-MMM-yyyy", $some_date)
You can use other methods .
follow API docs on it:
https://docs.atlassian.com/atlassian-confluence/latest/com/atlassian/confluence/core/DateFormatter.html
Hello Uththira,
Create new user macro form Confluence admin -> User macros -> create new macro and put the below on bottom of the Template.
$action.dateFormatter.formatGivenString("dd-MMM-yyyy hh:mm:ss", $content.currentDate)
Give the macro name. example- current-date-time. Save the macro
Inser macro in page {current-date-time}
It looks like you're new here. Sign in or register to get started.