Sorting data based on time
이전 댓글 표시
I have multiple csv files and each looks like this.

First column is an ID and the second one is the time (yyyymmddhhmmss). Here date does not change (yymmdd) but the hours changes. Is it possible to create seperate csv (or txt) files with a time limit?
For example, for one ID, could following files be created?
- data raws between 00hr and 03hr
- data raws between 03hr and 06hr
- data raws between 06hr and 09hr etc.
For instance, if there are no data for a given time period, it either creates no csv file or creates an empty csv file.
Again, I'm trying to explore more with this approach. Any suggestion is appreciated!
댓글 수: 3
Ameer Hamza
2020년 3월 6일
Can you provide a sample CSV file? I will help in suggesting a solution.
Jake
2020년 3월 6일
Ameer Hamza
2020년 3월 6일
Hi James, please check the code in the answer below.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!