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:
into this:
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
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
Hello @oaguirre ,
Where you able to resolve this problem? I am also facing the same issue. My concern is also I have lot of dates scatter all over the page and cannot change in each in above mention format (in answer) using source editor. Anything where we can place IF..then loop where it automatically pick confluence's formatted date would be more easier.
Please suggest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.