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

0 votes
Accepted answer

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
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

919 views 13 11
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