Include date in Confluence
Asked by Felix Sargent:

Hi!

I'm trying to put in a date into a wiki page. On auto-generated Retrospective pages, there is an excellent date picker. I'd like this on other pages, but I can't figure out how to include it. It's not a macro, and doesn't exist anywhere within the documentation. The only way I've been able to include the same functionality has been to literally copy and paste the date picker to the new page.

See screenshot. Top is what I want. The rest is how hard I'm trying.

![](http://cl.ly/image/2L0X1G2j460H/Screen%20Shot%202014-07-30%20at%203.09.15%20PM.png)  
[](https://community.atlassian.com/t5/Confluence-questions/Include-date-in-Confluence/qaq-p/371181?attachment-id=9633){#link_1189a4979dd1a7}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/62694/1/Capture2.PNG){#display_1189a4979dd1a7_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Include-date-in-Confluence/qaq-p/371181?attachment-id=9634){#link_1189a4979dd1a7_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/62694/2/Capture1.PNG){#display_1189a4979dd1a7_2}


Answers:
author: snorrish
body: You can press // to initiate the date picker.

comments: author: Felix Sargent
body: Oh WOW. Where is that documented? I have no idea how I would have found that out. Google Search: Date Picker Confluence and you get nothing.

Feature request - include the date picker under the Macro's list.


author: AsmitaD
body: Thank you it works fine.

I agree with @Felix Sargent, found no documentation for it.


author: Rob Gilliam
body: If you're creating a minutes from a meeting template then the "actions" section gives a hint, but otherwise I don't think it's documented.


author: David Skreiner
body: <https://confluence.atlassian.com/conf57/keyboard-shortcuts-701434627.html>


author: AnnWorley
body: The documentation is in the product help:

[Keyboard shortcuts](https://confluence.atlassian.com/display/doc/Keyboard+Shortcuts)


author: Rob McMurtry
body: The documentation is for // as in you're typing and inline enter // and get the date picker.

This is not what Felix is referring to. In the retrospective (and other) templates there's a lozenge that inserts the current date when you create the document.

Where is that functionality documented? I've been futzing with it off and on with poor results.


author: Szymon Jachim
body: [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) I followed your link. This "//" is not documented there.


author: AnnWorley
body: Thank you very much for pointing this out! I scoured the keyboard shortcut help pages in both Confluence 6.4 and Confluence Cloud and I did not see the date picker: // shortcut.

Then I found that this has been reported before: [Add documentation for date picker keyboard shortcut](https://jira.atlassian.com/browse/CONFSERVER-43797)

Please feel free to comment or vote on the ticket. Doing so will communicate directly with the team responsible for the ticket and also, add you to notifications so you'll know when action is taken on it.


author: boardtc
body: Is there any way to change the date format so after selecting a date the day will be shown for example?


author: Nandini Vyas
body: Will the date picker always display current date and refresh automatically everyday?


author: Felix Sargent
body: Source says it's

```
<p>&nbsp;<time datetime="2014-04-25" />&nbsp;</p></td></tr>
```

but I don't how how to include that.

comments: author: Akhil Gupta
body: change the code..never be unsure!


author: Ronald Tague
body: Thanks for sharing


author: Abhay Patil
body: BTW, the "//" as date picker has **STOPPED WORKING** today!! :(

comments: author: Abhay Patil
body: And today it is working alright!


author: Stiltsoft Support
body: Hello Community.

[@Casey Maynard](/t5/user/viewprofilepage/user-id/1140025)asked about the ability to change the date without page editing. Handy Date is the solution for this use case. It's one of the macros of [Handy Macros for Confluence.](https://marketplace.atlassian.com/apps/1214971/handy-macros-for-confluence-formatting-and-interactive-ui?tab=overview&hosting=server&utm_source=atlassian-community&utm_medium=answer&utm_campaign=handy-macros-traffic-sources&utm_vendorID=1216111&utm_content=insert_date)

Our app includes many other useful macros in a bundle, like statuses, buttons, reminders, and more. So you could use not only advanced date picker with it.


author: Bradley Kelly
body: Thanks for useful answers.


author: ShelleyDee
body: I use the Page Info for Scriptrunner macro to insert created date, last modified date etc on pages.

[https://marketplace.atlassian.com/apps/174/page-info-for-scriptrunner-confluence?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/174/page-info-for-scriptrunner-confluence?hosting=server&tab=overview)

It's free but I'm pretty sure you need to purchase Scriptrunner to make it function correctly.

comments: author: Casey Maynard
body: Well Scriptrunner is not an affordable option. Luckily most of the functionality we were using it can now be queried directly in the base product of JIRA/Confluence.

Would this script work on being able to query the Release Date for a Fix Version? (without having Scriptrunner installed?)


author: Casey Maynard
body: Is it possible to enter a specific date using the // format?

I would like to enter // 2008-09-17, but the date picker only seems to allow dates to be entered through the GUI date picker and enter past dates is very cumbersome through this process (can you imagine how many clicks i have to use to enter this date via the date picker without being able to enter it directly?

How can this be a 'feature' if it is not very usable?

How can this be a feature if it has a 'bug' that was just NOW (well 3 weeks ago) entered, and will unlikely be fixed any time soon.

<https://jira.atlassian.com/browse/CONFSERVER-55188>

comments: author: Peter Andersen
body: Typing

//17/9/2008

works for me.

if it is current year you can do with

//17/9


author: Casey Maynard
body: The key word there is 'typing'. Yes that works but I need to 'paste' a date. I have over 3000 dates that need to be entered (from an excel table) and I want them to use the // date formatter, but pasting the //17/9/2008 does not use the // date formatter it just gets pasted as text \>\>\> //17/9/2008


author: Casey Maynard
body: Update. I recently discovered that just typing '17-9-2008' (without typing // before this) and then hit enter works. I am not sure if this is a change or if I never tried this. But I still need a way to paste dates (or a script that can covert them into the date formatter.

Also, it does occur to me that the date format that I enter 'dd-mm-yyyy' does not match the format that is eventually displayed. 'dd-Mmm-yyyy'.

It is amazing that such a simple feature is

1. Poorly documented

2. Poorly implemented


author: Casey Maynard
body: Is it possible to be able to have a date picker available to change the date on the page without having to go into Edit Mode?


author: ?lafur Gu?mundsson
body: Does anyone know how to format this // date picker? It doesn't seem to follow the settings under general formatting settings as I would have assumed. As described here: <https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html>

comments: author: Realtek IT
body: Does anyone know how to format this // date picker?


author: Realtek IT
body: I find temp solution

\<script\>  
jQuery("time").each(function(index, value){  
var element = value;  
var mytime = jQuery(element).attr("datetime");  
if(mytime != null)  
jQuery(element).html(mytime);  
});  
\</script\>


author: Casey Maynard
body: Where can this temp solution be implemented?


author: Riccardo
body: I dont think you can. At least not for the "Cloud" version of Confluence. In the "Server" version you can add it as a user-macro.


author: Casey Maynard
body: Two questions

1. When I add that as a user-macro (I have server version). It does not appear when I type {datepicker}. How do I get the macro to appear

Note: I entered the exact text below into my macro

\<script\>  
jQuery("time").each(function(index, value){  
var element = value;  
var mytime = jQuery(element).attr("datetime");  
if(mytime != null)  
jQuery(element).html(mytime);  
});  
\</script\>

2. How do I set the format to be mm/dd/yyyy in that macro?


author: Riccardo
body: It might be better to use the solution provided by Milo

<https://community.atlassian.com/t5/Confluence-questions/Insert-current-date-in-a-Confluence-template-onDemand/qaq-p/207147#M113878>

This way you can change the date output.

(ps, you will have to change the HtmlSpecialChars)


author: Casey Maynard
body: My apologies, I do not know what I would need to change?

And see the other thread, as I had issues in creating the macro itself, in that the macro would not be created if I created the macro 'as is', but that may be due to the fact that I do not know how to 'change the HTMLSpecialChars).


Tags: cloud

confluence-cloud

new-to-confluence