Date time conversion 24

5 ビュー (過去 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 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