How to show today's date in confluence page
Asked by maziar ebrahimi:

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?


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@maziar ebrahimi](/t5/user/viewprofilepage/user-id/5049048) ,

If your company uses our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=cloud&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app (you may try to find its Table Filter or Pivot Table macros in the macrobrowser to check), you may use the [Table Transformer](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro to show the current date using the NOW() SQL function.

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

![Mon 11-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/219819i452DA5D08E506410/image-size/large?v=v2&px=999 "Mon 11-1.png")

comments: author: huangbin chen
body: hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) ,  
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](https://community.atlassian.com/t5/image/serverpage/image-id/312505iE0E10760A2C81935/image-size/large?v=v2&px=999 "20240317-1.png")

![20240317-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/312506i44BC056BD99296B9/image-size/large?v=v2&px=999 "20240317-2.png")


author: Stiltsoft support
body: Hi [@huangbin chen](/t5/user/viewprofilepage/user-id/4921775) ,

The query is a working one:

![Mon 4-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/312655i66401DA543526482/image-size/large?v=v2&px=999 "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](https://stiltsoft.atlassian.net/servicedesk/customer/portal/14). 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.


author: huangbin chen
body: 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.


author: Stiltsoft support
body: **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](https://spreadsheets-for-confluence.stiltsoft.com?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) 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!


author: Vamsi Kandala
body: Hi [@maziar ebrahimi](/t5/user/viewprofilepage/user-id/5049048)

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.png](https://community.atlassian.com/t5/image/serverpage/image-id/327231i3CA3351708966B61/image-size/large?v=v2&px=999 "Screenshot 2024-05-31 104548.png")![Screenshot 2024-05-31 104530.png](https://community.atlassian.com/t5/image/serverpage/image-id/327232i8FD6592908CFF4DA/image-size/large?v=v2&px=999 "Screenshot 2024-05-31 104530.png")


author: CoolThingsLab
body: 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.


author: Mike Kamali
body: 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.


author: Dylan Brotherton
body: 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](https://jira.atlassian.com/browse/CONFCLOUD-74864)  

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.


author: Fabio Racobaldo _Herzum_
body: Hi [@maziar ebrahimi](/t5/user/viewprofilepage/user-id/5049048) ,

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

comments: author: maziar ebrahimi
body: 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


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


author: Balaji Shriram Murkute
body: Hi [@maziar ebrahimi](/t5/user/viewprofilepage/user-id/5049048)

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.

comments: author: Shadi Shahsavani
body: 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.


author: G subramanyam
body: Hi [@maziar ebrahimi](/t5/user/viewprofilepage/user-id/5049048) 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 Macro](https://confluence.atlassian.com/doc/content-by-label-macro-145566.html)** : Add 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 Formats](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html)** : You can change how times and dates appear throughout your Confluence site to suit your organization's preferred date format.


Tags: filter

atl-orange

confluence-server

date

server

table

table-filter

table-filter-and-charts

table-filter-charts-spreadsheets

table-spreadsheet

table-transformer