Timestamp Formatting (Datenum Limitation?)

조회 수: 15 (최근 30일)
Kwen
Kwen 2013년 6월 19일
If I want a timestmap of the format string such that 'mm/dd/yy HH:MM:SS PM' is my format into matlab's numerical number,
datenum(01/01/13,'mm/dd/yy HH:MM:SS PM')
only displays the general number associated with the date and not the time. How do I correct this to get the full number with decimals indicating the time as well?

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2013년 6월 19일
편집: Andrei Bobrov 2013년 6월 19일
datenum('01/01/13 03:12:45 PM','mm/dd/yy HH:MM:SS PM');
ADD
datenum({'01/01/13 03:12:45 PM','01/02/13 06:12:45 AM'},'mm/dd/yy HH:MM:SS PM')
  댓글 수: 2
Kwen
Kwen 2013년 6월 19일
Sorry that was a typo in my question, but not in my code. This runs for this specific date only, but errors on a vector.
Andrei Bobrov
Andrei Bobrov 2013년 6월 19일
For vector? See ADD in my answer.

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

카테고리

Help CenterFile Exchange에서 Time Series Objects에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by