How to extract all the data between two different dates?

44 ビュー (過去 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 Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by