how to arrange in ascending order
Hi, guys. I have a doubt: there is how to arrange in increasing order the months and years?
Binnu Jesudasan Gudapati
Edit > Line Operations > Sort Lines As Integers Ascending
Hello Neto Bezerra and Binnu Jesudasan Gudapati,
Binnu, I don’t think that’s exactly the sorted list of dates that would like Neto ! Indeed, from the original example list of dates, below :
11/2011 04/2013 08/2012 01/2011 05/2014 03/2013 10/2012
if we perform the sort Edit > Line Operations > Sort Lines As Integers Ascending, we obtain :
01/2011 03/2013 04/2013 05/2014 08/2012 10/2012 11/2011
It’s easy that this list is not sorted by year :-(( But you can easily sort a list of dates, if your remember one important rule :
Write the different items of the date, from
right, from the
less frequentlychanged item to the
more frequentlychanged item
In our case, as years changed less frequently than months, we must re-organize the list, according to the template
year/month. To do so, just use the following S/R, in Regular expression mode :
Therefore, from the original example, above, we get, after the S/R, the new list :
2011/11 2013/04 2012/08 2011/01 2014/05 2013/03 2012/10
Finally, we perform the classical sort Edit > Line Operations > Sort Lines
LexicographicallyAscending, to obtain the well-sorted list ( to my mind ! ), below :
2011/01 2011/11 2012/08 2012/10 2013/03 2013/04 2014/05
Perhaps the OP needs the data to be in the
format after the sort.
Simply performing again guy038’s regex search and replace will do that.
Oh yes ! I forgot that final point ! Thanks for your reply !
Thanks so much, guys!!!
Guys, there is a possibility to put some kind of marking or space for when happening a break in the sequence?
Thank you very much in advance!!
You need to do some programming in order to achieve that.