How to show today's date in confluence page

maziar ebrahimi October 7, 2022

Dear Community,

I'm trying to make a management report and for that need to show on the report always the date of today. How can I do that in Confluence? 

9 answers

6 votes
Katerina Kovriga {Stiltsoft}
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.
October 10, 2022

Hi @maziar ebrahimi ,

If your company uses our Table Filter and Charts for Confluence app (you may try to find its Table Filter or Pivot Table macros in the macrobrowser to check), you may use the Table Transformer macro to show the current date using the NOW() SQL function.

SELECT FORMATDATE(NOW())
AS 'Today is'
FROM T*

Mon 11-1.png

huangbin chen
Contributor
March 16, 2024

hi @Katerina Kovriga {Stiltsoft} ,
I am facing problem by using your Table Transformer SQL query.
Could you please help share the reason?

Same SQL query but I got "NaN:NaN".

 

SELECT FORMATTIME(NOW())
AS 'Today is'
FROM T*

 

How do I get date like "Mar 17, 2024" Format.

20240317-1.png

20240317-2.png

Stiltsoft support
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.
March 18, 2024

Hi @huangbin chen ,

The query is a working one:

Mon 4-1.png

Please check what you have in the Settings tab -> Date format field.

For your case the format should be set as "M dd, yy".

If this doesn't help, please check the app's version. For Data Center the current one is 11.1.0, for Cloud the updates reach customer instances automatically but recently we've had a version that required manual update - please check that everything is up-to-date and update if required.

If the issue still persists, please refer to our support. Attach a page storage of your page (upper right corner of the page -> menu ... -> View storage format): then we'll be able to recreate exactly you page, macros, queries and look into the issue.

Like # people like this
huangbin chen
Contributor
March 18, 2024

Hi,

Unfortunately I am using v10.5.0 and I am not be able to update it. However, I might try to have storage format to get technical support there.

Thanks.

Like Stiltsoft support likes this
Stiltsoft support
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.
August 22, 2024

And an update from our side for other people who may come across this question: if you prefer an Excel-like style of working, you may check our spreadsheets' family that is also provided by the app.

Familiar cell formulas (as well as =TODAY() that has been mentioned here) can be more friendly for some users, so please give it a try!

1 vote
Vamsi Kandala
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.
May 31, 2024

Hi @maziar ebrahimi

If you or anyone else were still looking for the solution for this:

I also tried the example provided above received the error "NaN:NaN".

But, I realized the Confluence now does not recognize 'T' variable for the table and replaced it with 'T1'.

Below are the steps to make it work:

  • Add the 'Table Transformer' in the page
  • Set the SQL query as:
    • SELECT FORMATDATE(NOW())
      AS 'Today is'
      FROM T1
  • Within this 'Table Transformer' macro add the table with one heading and one cell
  • Enter the heading of the table as 'Today is'
  • Update the page

I have enclosed the screenshots for reference.

Not that you can customize the table heading anyway you want.  Suppose, you want the table heading as 'Current date', then you must update the SQL query and replace 'Today is' with 'Current date'.

Hope this helps.

Regards
Vamsi

Screenshot 2024-05-31 104548.pngScreenshot 2024-05-31 104530.png

0 votes
CoolThingsLab
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2024

For me the trick was to create a new Team Calendars from macro and put it in month mode. it has Today button so you will be able to change it. also putting it in list view will shows today date.

0 votes
Mike Kamali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 18, 2023

If you don't mind having the time alongside the date, you can use the Current Time macro.

Go to:

Insert more content (+) -> Other macros -> Current Time

This will show you something like this: 19-Dec-2023 04:24:15

It resolved my concern. I hope you also find it beneficial.

0 votes
Dylan Brotherton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2023

It is my understanding that having a dynamic date to always display the current "Today()" date is not an option. I have read from someone at Atlassian that a feature like this would not add value. Perhaps if enough users suggested it (with use cases perhaps) they may add it? I found this active feature suggestion that should be upvoted if you want this capability:

https://jira.atlassian.com/browse/CONFSERVER-41334

I have been trying to solve this same issue. It would add value to my work, specifically adding Jira report filters. Those filters can easily handle dynamic dates, but trying to represent that in Confluence is not possible. As a non-admin user it is frustrating that all the "solutions" for this require admin-level access.

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2022

Hi @maziar ebrahimi ,

welcome to the Atlassian community!

you can implement your own macro that shows the current date in a page. (https://gebsun-confluence.atlassian.net/wiki/spaces/RTC/pages/17367055/Date+and+datetime+macros)

Hope this helps,

Fabio

maziar ebrahimi October 10, 2022

Dear Fabio thanks for your quick reply. I'm using Server version which doesn't have the macros. s there anyway to create these macros in Confluence server? BR, Maziar

0 votes
maziar ebrahimi October 9, 2022

I'm trying to always show the current day, like today shows Oct 10th tomorrow shows Oct 11th and on

0 votes
Balaji Shriram Murkute
Contributor
October 9, 2022

Hi @maziar ebrahimi 

you can directly use Date Macro

There are two ways add Current date in confluence page

1) You can Press  /date

2)You can Press //

and select current Date.

Shadi Shahsavani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2023

Date doesn't change every day to the current date, does it?
For me it just shows the same date - date of addition of the formula. 
Like Maziar, I would need to show today's date, ie that the date updates to the current day.

Like Keri Mason likes this
0 votes
G subramanyam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 7, 2022

Hi @maziar ebrahimi welcome to the Atlassian community.

Their are 2 ways to add the date macro or use it for your Confluence purpose.

1. Content by label MacroAdd a Content by Label macro to your page to display a list of pages, blog posts or attachments that have particular labels

OR

2. Configuring Time and Date FormatsYou can change how times and dates appear throughout your Confluence site to suit your organization's preferred date format.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events