mix of date formats - converting to one

martyp

Board Regular
Joined
Apr 12, 2006
Messages
61
Hi all,

I have a spreadsheet that has a few different date formats in nearly 2000 rows in column A. I want to be able to somehow organise the sheet by date order.
The date formats I have are:
dd/mm/yyyy hh:mm
dd/mm/yyyy hh:mm:ss
yyyy.mm.dd hh:mm

Can anyone advise on the best way of sorting into date order or converting the dates?

Many thanks
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
As long as your dates are true Excel serial dates/times they will sort properly.
Excel will see all dates the same, no matter what they are formated to.
If some are text rather than dates, that is a different story.

Give your data a sort and see what you get. If it doesn't sort as you expect, you may need to convert text to dates first.
 
Upvote 0
Hi John,
Thanks for your reply. When it was sorted, I got dates in the order below:
format of dd/mm/yyyy hh:mm in order (2001-2008)
then the format dd/mm/yyyy hh:mm:ss (ordered by dd rather than chronological e.g. 01/02/2002 then 02/01/2002 then 03/01/2002)
then the dates in the format yyyy.mm.dd hh:mm which are in chronological order.
 
Upvote 0
Hi again,

I've sorted the dates starting with yyyy by replacing the . with /. That got those in order. I'm not sure how to sort the dates which have the hh:mm:ss at the end. I'd like to remove the :ss part...?
 
Upvote 0
Many thanks for the link. I should have thought to simply separate the date and time into columns by space and then convert the time then to hh:mm.
I've got them seperate now but could easily merge cells if needed.
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,209
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top