Formatting Dates using the Common table capabilities

Jodie Miners
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 14, 2012

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
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
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 14, 2012

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.

Jodie Miners
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 15, 2012

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

0 votes
Amalia
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 14, 2012

which version of Confluence are you using?

0 votes
Jodie Miners
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 14, 2012

3.5.7 currently.

0 votes
Jodie Miners
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 14, 2012

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events