I am able to add a date from the content by using
https://confluence.atlassian.com/conf71/configuring-time-and-date-formats-979423992.html
I am not able to get this date to show the current date, it is showing the date I choose after adding the content. Is it possible to make it default to the current date?
Hi @Bret Wisecarver ... There isn't an option on cloud. There might a possibly on server or DC if you manipulate the velocity template.
welcome to this wonderful community.
As your link is showing server link my solution may work out for you - I created a simple costumer macro which shows last date modified.
##Macro title: AUI Button
## Macro has body: N
## @noparams
$action.dateFormatter.formatDateTime($content.getLastModificationDate())
It's working fine for us.
We use it in a table with page properties and it looks like this.
Feel free to ask for more help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Fabienne Gerhard ,
we had similar user macro on our instance but after migration to Confluence 7.19.8(Data Center) it stop working. We moved from 7.4.18
## Macro title: Current Time
## Macro has a body: N
## Body processing: No macro body
## Developed by: Steven Behnke
## @noparams
##https://community.atlassian.com/t5/Confluence-questions/Insert-current-date-into-Confluence-page/qaq-p/313517
##$action.dateFormatter.formatGivenString("dd-MMM-yyyy hh:mm:ss", $content.currentDate)
$action.dateFormatter.formatGivenString("dd-MMM-yyyy", $content.currentDate)
It is also not working once i tried your version
Is there some "how to" to be able to fix it on our current Confluence version?
thank you
KR, Pavol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution from following article helped me to get it work again. Currently we are on Confluence v8.5.14 and our user macro for current_date works correctly now.
our user macro looks like that:
## Macro title: My Macro
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name
## @noparams
##https://community.atlassian.com/t5/Confluence-questions/How-can-I-get-the-current-date-as-a-formatted-string-in-a-User/qaq-p/2462351
$action.dateFormatter.formatGivenString("dd-MMM-yyyy hh:mm", $action.dateFormatter.getCalendar().getTime())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.