Formatting Issues

How to Sort Times with AM and PM in a Word Table

John WilsonJohn Wilson Oct 28, 2026 870 views

Question details

The user needs to sort a list of 12-hour time values chronologically within a Word document table.

How to Sort Times with AM and PM in a Word Table
Product
Microsoft Word
Device & OS
not provided
Scenario
Sorting a table column containing time entries formatted with AM and PM designations.
Observed behavior
Word sorts afternoon times incorrectly because it treats the AM and PM values as plain text, resulting in a numerical or alphabetical sort instead of a chronological one.
Before you start

Ensure all time values in your column follow a consistent format before attempting to sort, as mixed formatting can lead to unpredictable sorting results.

Solution 1Recommended

Use Word's Date and Time Formatting

Insert times using Word's built-in format recognition to ensure they are sorted chronologically.

By officially designating the cell contents as time values rather than plain text, Word can properly process the AM and PM markers.

1
Insert time format

Select the first cell in your time column. Navigate to the 'Insert' tab and click on the 'Date and Time' command.

2
Choose AM/PM format

Select a time format that explicitly includes AM/PM from the list and click 'OK'.

3
Apply and edit

Copy this newly formatted time to the other cells in your column, then edit the numbers to reflect your actual time values.

4
Sort the table

Select the entire time column. Go to the 'Home' tab and click the 'Sort' button.

5
Configure sort options

In the Sort dialog box, choose the correct column under 'Sort by', select 'Date' as the type, select 'No header row' (or 'Header row' if you have titles), and click 'OK'.

Use Word's Date and Time Formatting
Correct Sorting: Selecting 'Date' as the sorting type forces Word to read the underlying chronological value instead of the leading numbers.

Easily Manage and Sort Tables with WPS Writer

WPS Writer offers robust table management tools and seamless spreadsheet integration, allowing you to format, organize, and sort time values accurately without hassle.

  1. 1. Open your document: Launch WPS Writer and open the document containing your time table.
  2. 2. Format your times: Ensure your AM/PM times are uniformly typed so the software can recognize the time values.
  3. 3. Sort the table: Select the column, go to the 'Table Tools' tab, click 'Sort', choose 'Date' as your type, and apply the sort.
Advanced table formatting and sorting capabilitiesFully compatible with Microsoft Word document formats (.docx)Built-in seamless integration with WPS Spreadsheet for complex data sortingFree, lightweight, and user-friendly interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word sort 1:00 PM before 9:00 AM?

Word often reads AM/PM times as plain text instead of actual chronological values. Alphabetically and numerically, '1' comes before '9', causing afternoon times starting with a 1 to appear first when sorted.

Can I separate AM and PM into a different column to fix the sorting?

Yes, placing the numerical time values in one column and the AM/PM designations in a separate adjacent column allows you to sort by the AM/PM column first, and then by the time column.

Is there a way to sort a table without affecting the header row?

Yes. When you open the Sort dialog box in Word, look at the bottom of the window and select the 'Header row' option. This ensures your column titles remain at the top and are excluded from the sort process.