Reputation: 1455
I am trying to add a character "-" in between the values into every cell for the Date column such as those in row 3 and 4. How can I do that ? I am planning to format it into the date format like row 2. So I would need to add the "-" in order to do so.
Upvotes: 0
Views: 1119
Reputation: 328
This is just an alternate solution. If you want your data to be identified as a date, then the above solution is complete. But I have had occasions when I need it in a specific format which the spreadsheet program doesn't provide by default. I don't use LibCalc, so wouldn't know if you did get a YYYY-MM-DD output format. If not, then this could be the way (though I am not sure it will get recognised as a date format, but mostly as text)
Your data seems to be in YYYYMMDD order. You can insert a column between A and B, and in cell B1, write this formula =CONCATENATE(LEFT(A1,4),"-",RIGHT(LEFT(A1,6),2),"-",RIGHT(A1,2))
Upvotes: 0
Reputation: 13820
To convert the text to dates:
Data -> Text to Columns
.Date (YMD)
. Press OK.For step by step screen captures, see http://cca220v.net/blog.php/2012/12/20/convert-cells-from-text-to-date-libreoffice.
Upvotes: 1