Tuesday, April 17, 2018

yogi_Sort A Column Of Dates In M/D/YYYY Style By Day In Ascending Order

Google Spreadsheet   Post  #2428

Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     Apr-17-2018

question by: Sabrina3241
https://productforums.google.com/forum/#!topic/docs/P-F5jAm0waA;context-place=forum/docs
Sort by a column that has mm/dd/yyyy - chronological, not by first digit
My sheet keeps sorting the column by month, instead of mm/dd/yyyy. For example:

3/31/2019
3/31/2019
4/1/2018
4/11/2018
4/15/2019
4/15/2019
4/30/2019
5/1/2018
5/1/2018


I want it in chronological order by date, not by the first number. I cannot share the spreadsheet, but here is my formula:

=query(importrange("link", "Sheet1!A:AS"), "select Col4, Col18, Col19, Col20, Col21, Col22, Col25, Col26, Col27, Col39 where Col18 contains '1' or Col20 contains '1' or Col21 contains '1' or Col22 contains '1' order by Col39 asc format Col39 'mm/dd/yyyy'",0)

No comments:

Post a Comment