Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

675.Text sort -- How to sort csv files by column B, which has date of format "21/Jan/2010"?

User: editor -- 2010-12-10          << 674  676 >>
Hits: 2059
Type: Text sort   
Search all Text sort examples
Description:
How to sort csv files by column B, which has date of format "21/Jan/2010"?
Input Sample:
AAA,18/Mar/2010,39
BBB,21/Jan/2010,42
FFF,18/Feb/2010,28
Output Sample:
BBB,21/Jan/2010,42
FFF,18/Feb/2010,28
AAA,18/Mar/2010,39
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open csv file
2. ctrl-h open 'replace' window
* set 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace', the data format is changed to 'YYYY-MM-DD'
4. ctrl-h open 'replace' window again
* set 'replace with pattern' to:

* click 'settings' tab, set 'word input delimiter' to "other" and fill a comma "," at the following entry.
5. click 'replace', the data is sorted by the second column

If you need to change the date format back:
6. ctrl-h open 'replace' window again
* set 'search for pattern' to:

* set 'replace with pattern' to:

7. click 'Replace', done!
8. ctrl-s save to file.

Note: for multiple files, you can save above 3 operation steps into a script, and use "Batch Replace" operation accordingly.
Download Script:  scripts/675.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Settings_Window


Screenshot 3:  Replace_Window


Similar Examples:
How to convert csv files into tables with html format? (55%)
How to sort all the lines by the order of date with format day-month-year? (53%)
How to sort file by the number which first appear in each line? (52%)
How to batch split files into columns that separated by comma? (52%)
How to sort the files by number, and batch rename them? (50%)
How to insert two columns into a database file separated by "|"? (48%)
How to split files by columns with fixed widths, and save to files with sequence? (48%)
How to rename files to the last 10 chars of 3rd line of file content? (47%)

Check Demo of Text sort
Keywords:
ddd  sort csv files  odd  sort csv  sort csv file  yyyy  formattime  second column  date format  csv files  search replace date format word  sort data  csv sort  change format of multiple files  replace comma tab  multiple files into csv  multiple script  replace with multiple data