Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I imported a column with dates in my sheet. The are of the form yyyymmdd. Thus 20121023, 20121022 etc .

I want to apply date related functions on this column, but for libre office these fields are just numbers. How can I make libre office recognize them as dates?

share|improve this question
add comment

2 Answers

Select the column number (eg A) of the spreadsheet that contains the dates. Right-click and select 'Format Cells'. Select 'DATE' category from the left-hand panel. Choose your desired format and apply the changes.

You can easily use date-functions on the column(s) now.

share|improve this answer
add comment
  1. Select the range of cells that contains the imported dates.

    enter image description here


  2. Press Ctrl+1 to launch the Format Cells dialog box.

    In the Format Cells dialog box, do the following:

    • Select the Date category.
    • Select a valid date Format.
      • You can also create a custom (user-defined) date format by typing a format on the Format code text field and clicking on Add (the check mark) button.
    • Click the OK button.

    enter image description here

Note: Another way of launching the Format Cells dialog box is by right-clicking on the selected range and selecting Format Cells... from the context menu.

You can now perform date calculations on the selected range.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.