How to extract all the data between two different dates?

조회 수: 42 (최근 30일)
Gaetano Mannino
Gaetano Mannino 2022년 12월 27일
답변: Eric Sofen 2022년 12월 27일
I would like to extract all the data from a timetable between the upper and lower time limit.
as example between 01/06/2021 07:50 and 15/06/2021 12:00.
How can i implement the filter (without looking just the row number)?
Thank in advance

채택된 답변

Simon Chan
Simon Chan 2022년 12월 27일
You may use function isbetween.
  댓글 수: 1
Gaetano Mannino
Gaetano Mannino 2022년 12월 27일
Thank you very much, it's easier than the way i was trying to use

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Eric Sofen
Eric Sofen 2022년 12월 27일
I'd recommend using a timerange.
Isbetween returns a logical vector based on a vector of datetimes. This can then be used to index into a timetable.
Timerange is used directly by the timetable to select the rows between the specified end points.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by