The Sort command in OpenOffice Calc 4.1, found in the Data menu, enables you to sort the data in your spreadsheet based on its contents, either in ascending or descending order. For the command to work correctly when sorting dates, the cells containing the dates must be formatted as dates. This is unlikely to be an issue in the majority of cases, since OpenOffice Calc is designed to identify an entry typed as a date in a cell and automatically apply the correct formatting.
If the cells were formatted as text before you typed the dates in, however, the command sorts them in alphabetical rather than chronological order. To solve this, select the cells, right-click, select Format Cells, change the category to Date and click OK. Depending on how the dates were originally entered, you may also need to further alter each cell. For example, OpenOffice Calc automatically adds an apostrophe as the first character to cells that are formatted as text but begin with a number, to force them to display properly; you will need to remove this apostrophe from each cell for the sorting to work correctly.
Select the entire range of cells you want to sort.
Click Data and select Sort.
Select the column that contains the dates from the first drop-down menu and then select either the Ascending or Descending radio button, depending on whether you want to sort with the earliest date at the bottom or at the top.
Select a second and third column to sort by, if necessary, and then click OK.
To sort columns instead of rows, click the "Options" tab and select the "Left to Right" radio button before clicking "OK."
To see at a glance whether your cells are using the correct formatting, press "Ctrl-F8." Cells formatted as text display their contents in black, while cells formatted as numbers -- which includes dates -- display their contents in blue.