It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to convert a text date into a formatted date for multiple values in a table? Edited

We handle a lot of tables with a lot of dates in the text format: DD-MM-YYYY or MM-DD-YYYY. I know I can add a date to a cell with //mm-dd-yyyy, but doing this one by one for two columns of 300+ values is kind of hard, so I'd like to know if anyone has done this, if there is a procedure to convert this:

date-to-format-1.png

into this:

date-to-format-2.png

for all the cells in those columns, of course, these are two columns from a larger table, with about 10 other columns with devices information, i.e. name, description, S/N, P/N, address, country, etc...

If it can be done when I'm pasting the table from the source, the xls file, that could also work, I just need the dates to be in that format so it's clear to everyone which date 02-04-2019 is (April 2nd or Feb 4th?) reading the table.

thanks in advance

 

1 answer

0 votes

Hello @oaguirre,

You'll need to call the macro directly, but you can do so using an add-on from Atlassian Marketplace to edit the source, such as Source Editor for Confluence.

You'll need enter the following in the Source Editor when you want to call a date macro:

<p><time datetime="YYYY-MM-DD" /> </p>

If I had a variety of date formats as you do, I would probably set up the cells in Excel so that when I enter a date it will automatically format the date to match what Confluence requires. You can then wrap the results in the the above formatting and directly edit your page using the Source Editor above.

You may be able to come up with a way to automatically format a list of dates as you have to the HTML table that you need to enter in the source editor, but unfortunately that's not something I'll be able to help you with on this end.

Let me know if you have any questions.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

283 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you