Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the date format from MM/DD/YYYY to DD/MM/YYYY in libreoffice calc?

I have a spreadsheet with existing date values that I'd like to convert from MM/DD/YYYY to DD/MM/YYYY format. Is there any way of doing this?

The spreadsheet comes from a csv file from someone else that i have opened in calc.

enter image description here enter image description here

like image 373
Steve Avatar asked Feb 11 '20 17:02

Steve


People also ask

How do I change the date format in LibreOffice Calc?

However, you can change it from the menu Tools -> Options -> LibreOffice Calc -> Calculate. See below. Right click on the date at A1 cell and click Format Cells. The default format of the selected cell would open up as below.

How do I change the date format from dd mm yyyy to dd mm yyyy?

Your answer First, pick the cells that contain dates, then right-click and select Format Cells. Select Custom in the Number Tab, then type 'dd-mmm-yyyy' in the Type text box, then click okay. It will format the dates you specify.

How do I change the date format in OpenOffice Calc?

To change the default date format using OpenOffice Calc In your spreadsheet, click on the Format > Cells > Numbers ; In the Category field, select Date ; Next, choose the date format in the Format field. Finally, click OK to...


3 Answers

  1. Select the cells with the dates and in Cell -> Format, choose the date format you wish (DD/MM/YYYY)

  2. Making sure the cells are selected, go to Data -> Text to columns choose "Separated by" and "Tab" and click "OK"

Cells should now have the desired format

like image 179
cybernetic.nomad Avatar answered Sep 30 '22 15:09

cybernetic.nomad


  1. Cut (or copy then erase) all values from the column (CTRL + X).

  2. Choose Edit -> Paste Special -> Unformatted text (MAJ + CTRL + ALT + V).

  3. On "Fields", click on your column, then select "Date (MDY)". It is important here to select the format the data currently is, NOT the format you want it to be.

If date is still not OK, you will need to follow this additional step (response above from @cybernetic.nomad):

  1. Select the cells with the dates and in Cell -> Format, choose the date format you wish (DD/MM/YYYY).

NB: Note that my LibreOffice Calc is not in english so I am not 100% sure about the option names.

like image 30
dandyboh Avatar answered Oct 04 '22 15:10

dandyboh


You select the cells to format, then you press Ctrl-1 (or choose "Format" - "Cells..." from the menu, or any other way) to open the dialog to format cells. There is a text field "Format code" where you enter "DD/MM/YYYY" without the quotation marks. Click "OK".

If that does not format the date like you want, the value in the cell is not interpretable as a date. Investigate the cell's value, you might have a text marker (a single apostrophe ') as the first character.

To check this out and experiment with the formats, choose "Insert" - "Date" from the menu. It puts the current date into the current cell.

Disclaimer: Since my Calc is not set to English, the names of menus and their entries might be different. I just guessed how they could be named.


EDIT:

If you can't change the cell format because the date is constantly recognized as "text", you might like to try this:

  1. Insert a column right from the date column. This produces in your case the column O. All columns right of it are pushed to the right.
  2. Put this formula in cell O2 on the right of the first date text:

    =CONCATENATE(MID(N2;4;3);MID(N2;1;3);MID(N2;7;4))
    

    It takes snippets (MID()) from cell N2 and concatenates them in the new order. Details of the functions are in Calc's documentation.

    You will need to adjust N2 to the correct cell reference if it is not the cell directly left of the cell you're entering the formula.

  3. Put the cell cursor on N2.

  4. Press these key combinations in sequence to mark a deep enough range of cells in column O: Control-Down, Right, Shift-Control-Up. The cell cursor will be on cell O2 now, and the range below and including it is marked.
  5. Now press Control-D to copy the formula in O2 into each cell in the range.

Now you will have a new column O with the text of N, but exchanged characters. The values are still "text", though.

If you like, you can shrink the width of column N now, or hide it.

like image 41
the busybee Avatar answered Sep 30 '22 15:09

the busybee