How can I compare only the time part of a datetime value?
I have an array of datetimes:
DT.Format = 'yyyy-MM-dd HH:mm:ss';
How can I identify those which fall between 6am and 6pm?
It should be quite easy, but my brain seems to have a massive block on datetime. (I have a lot of scripts that use datenum, and it never seems trivial to update them to datetime.)

 採用された回答

Voss
Voss 2024 年 5 月 24 日

1 投票

2 件のコメント

dormant
dormant 2024 年 5 月 28 日
Thanks.
Voss
Voss 2024 年 5 月 28 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2024a

タグ

質問済み:

2024 年 5 月 24 日

コメント済み:

2024 年 5 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by