Ask Your Question

How to sort dates with or without month

asked 2020-10-15 11:08:42 +0200

LOman gravatar image

I have a column of dates in the following format:

  1. September 1891
  2. June 1829
  3. 1887
  4. 1917
  5. March 1904
  6. April 1904
  7. 1927
  8. December 1892

Is there any way to sort them in date order? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-10-15 12:40:50 +0200

Frants gravatar image

It might be a good idea to keep the data in separate columns. Then the set can be sorted by any column.

edit flag offensive delete link more


How would that sort the dates? Each Month belongs to the Year. Ah, sorry, I think I see what you mean. l'll have a go. Thanks.

LOman gravatar imageLOman ( 2020-10-15 13:08:03 +0200 )edit

I can't make the date format like yours. Can you send a fragment of your table?

Frants gravatar imageFrants ( 2020-10-15 13:16:00 +0200 )edit

Thanks Frants. Separating the columns works fine.

LOman gravatar imageLOman ( 2020-10-15 13:18:08 +0200 )edit

The months aren't sorted correctly when the Year is the same but I'm not bothered about that.

LOman gravatar imageLOman ( 2020-10-15 13:20:26 +0200 )edit

Actually there might be a bug there because I set the Date column to format Date(MMMM) and it still didn't sort them correctly when the Years are the same.

LOman gravatar imageLOman ( 2020-10-15 13:27:55 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-10-15 11:08:42 +0200

Seen: 56 times

Last updated: Oct 15 '20