Current date macro in confluence?

Hi,

Is there a macro for displaying only the current date? I am having rss feeds in my confluence page. The feeds get updated on an hourly basis. So i want to have a verbage under each feed saying "last updated on so n so date". I dont want to go in everyday and manually do it so a current date macro from the systems clock would be very handy. Any solutions? plz help!

Thanks!

Avinash

2 answers

1 accepted

This widget could not be displayed.

I found it! You have to create a user macro with this $action.dateFormatter.format($content.currentDate) included in your templete.

This is great solution!

Hi guys,

I just wish to show the Year only and not the whole date. Could you please help me with that or guide me to any documenation?

Thanks heaps.

This may be no longer relevant to you, but as I stumbled across these examples requiring add-ons I thought I post the easiest one using the DOM:

## @noparams
#set($yr = 1900 + $content.currentDate.year)
$yr

Cheers @Guenter Huber, just what I was looking for. +1

This widget could not be displayed.

Run Plugin for Confluence

{run-now}$current_time{run-now}

Thanks Bob! But it says its a paid plugin. Can i create a simple user macro for this?

Probably. Google around to find what is available is velocity.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 4 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

26 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you