Date time conversion 24

조회 수: 9 (최근 30일)
Matlabbey
Matlabbey 2013년 11월 23일
댓글: Jan 2013년 11월 23일
I have date in three column: HOUR;MINUTE;AM/PM
I have try modestly to convert this to military time (1:00 to 24:59) but the datenum/string do not work.
Is there a method to this?
  댓글 수: 1
Jan
Jan 2013년 11월 23일
What does "date in three column" exactly mean? Is this a string, a file, a cell string or a numerical array?

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 23일
d='01:30 PM'
new_d=datestr(datenum(d,'HH:MM AM'),'HH:MM')

카테고리

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