Formatting Dates using the Common table capabilities

What is the exact syntax for formatting dates in a table (using Excel Macro), or what is the trick?. I can not get it to work at all.

My Excel content has column 1 as the date. The date is formatted in Excel as DD/MM/YYYY. In the wiki page I only want it to show as MMM-YYYY and be sortable so it sorts in date order.

Here is what I have tried.

  • Format the Date in MMM-YYYY in Excel and set the columnTypes=D - sorts as text, not date.
  • Format the Date in DD/MM/YYYY in Excel and set the columnTypes=D - sorts as Date - OK, but I don't want the day shown.
  • Set columnTypes=DMM-yyyy - it does nothing
  • Set the language=EN|country=AU Parameters to see if that changes anything - nope.

Any ideas that can help?

4 answers

1 accepted

Yes, you need the date.js file installed correctly for any Advanced date sorting. Specifically in .../includes/js. However, there is no data converted - you are just telling the macro the format of the field for sorting purposes.

Thanks for that answer Bob, so I gather then that there is no way to re-format the data at all between the display in Excel and the display in the page.

My answer is that I will have to display the date as MM-YYYY in Excel, install the date.js then set the Date format for the sort.

It all makes sense when you know how :).

Thanks

I think I may have answered my own question. Is the date formatting of DMM-yyyy etc only available if you install the date.js file on the server? I think I have tried that previously on another server and not had much luck with it.

3.5.7 currently.

which version of Confluence are you using?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

872 views 21 10
Join discussion

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