Current date macro in confluence?

Avinash September 11, 2012

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

6 votes
Answer accepted
Avinash September 17, 2012

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

amelandri April 21, 2013

This is great solution!

J September 5, 2013

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.

Guenter Huber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 23, 2014

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

André Lundin July 6, 2016

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

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2012

Run Plugin for Confluence

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

Avinash September 12, 2012

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

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events