필터 지우기
필터 지우기

How to populate datetime object with one month´s dates for every minute?

조회 수: 2 (최근 30일)
FX
FX 2016년 7월 19일
댓글: Guillaume 2016년 7월 19일
So I want to populate a datetime vector in this way: 01-Jun-2016 00:00:00 01-Jun-2016 00:01:00 01-Jun-2016 00:02:00 . . . 30-Jun-2016 23:59:00
How do I do it?

채택된 답변

Guillaume
Guillaume 2016년 7월 19일
d = datetime(2016, 6, 1) : duration(0, 1, 0) : datetime(2016, 6, 30, 23, 59, 0);
  댓글 수: 3
FX
FX 2016년 7월 19일
Also I would like to further edit the datetime vector to exclude certain periods from there. Ie. I want to delete a period of every Fri 5PM EST to Sun 5PM EST from the vector. Is there a 'datacutter' function or something like that, what would accomplish this task?
Guillaume
Guillaume 2016년 7월 19일
You can change the Format property of the datetime object to display it the way you want.
Possibly,
d.Format = 'dd-MMM-yyyy HH:mm:ss'

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

추가 답변 (0개)

카테고리

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