Forum Discussion
sorting date column oldest to newest
This problem is common!
These dates that you think them are dates are not dates!
They are texts!
Please provide us with a sample of these text dates, to figure out how to parse them!
- Celia CaloDec 03, 2017Copper Contributor
Here is a sample - I deleted a few name and email columns.
Thanks!
- Melanie TomitschDec 06, 2017Copper Contributor
Text to columns on the Data tab usually fixes that, just select date.
Also, if you've taken data out of MS Project. The date name "Tue" "Wed" etc is imported. It will fix it to actual dates by doing a find | replace "??? "
- Haytham AmairahDec 04, 2017Silver Contributor
When I opened the file on my device I didn't find any problem in the dates!
Because these dates are compatible with my local date format which is: M/d/yyyy.
FYI:
Dates in the Excel file must be compatible with the date format in the operating system, if the original format of the dates is different from the local date format, problems with dates will appear, they may be treated as text, or they may remain formatted as dates, but not as you think it.
Examples:
Local Date is: (M/d/yyyy)
Excel Date is: 15/12/2017
This date will be treated as text because there is no month 15!
Local Date is: (M/d/yyyy)
Excel Date is: 1/12/2017
This date will still formatted as Date in Excel, but not the date you may want.
You may think it 1/Dec/2017, but it actually 12/Jan/2017 as the local date format!
Please take this information into account.
You have to make the dates in your Excel compatible with your local date format, so please provide me with your local date format is it (M/d/yyyy), (d/M/yyyy), or something else, to provide you with the appropriate solution!
- Celia CaloDec 04, 2017Copper Contributor
OMG! this makes so much sense! thank you.
I tried changing my date local and all I could find was
in The Advanced options, to tick the "Use 1904 date system" - that didn't help.My local date is: dd/mm/yyyy
- Detlef_LewinDec 03, 2017Silver Contributor
Celia,
use "Get and transform" (aka Power Query) to connect to the csv-file and this code to convert the date column.
let Source = Csv.Document(File.Contents("D:\Sample Barak_TL.csv"),[Delimiter=",", Columns=3, Encoding=1252, QuoteStyle=QuoteStyle.Csv]), #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Changed Type with Locale" = Table.TransformColumnTypes(#"Promoted Headers", {{"Connected", type date}}, "en-US") in #"Changed Type with Locale"
- Celia CaloDec 03, 2017Copper Contributor
Thanks Lewin, but I don't understand...
Can you be very specific?I'm a novice user and don't know Excel well at all.
Thanks!