Generate time sequence with 15 minutes step time

6 ビュー (過去 30 日間)
Daniel Boateng
Daniel Boateng 2019 年 5 月 14 日
コメント済み: Daniel Boateng 2019 年 5 月 14 日
I want to generate a sequence of datetime from 1st March to 31st March with a step time of 15 minutes.
So the time will start from '01-Mar-2017 00:00:00','01-Mar-2017 00:15:00' ,'01-Mar-2017 00:30:00' to '31-Mar-2017 23:45:00';
I tried this code but it gives a step time of one day.
t1 = datetime(2017,03,1,0,0,0);
t2 = datetime(2017,03,31,23,45,0);
t= (t1:t2)';
Can anyone be of help please.
Thanks

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 5 月 14 日
t1:minutes(15):t2
  1 件のコメント
Daniel Boateng
Daniel Boateng 2019 年 5 月 14 日
thank you very much

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

その他の回答 (0 件)

カテゴリ

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