필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

date to number

조회 수: 1 (최근 30일)
bahare
bahare 2012년 1월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi How to change the date with this format to number: 09-08-01 00:56:33
Thanks
  댓글 수: 3
bahare
bahare 2012년 1월 19일
09:2009
08: August
01: day
Jan
Jan 2012년 1월 19일
What is the wanted number exactly? A datevec or a datenum?

답변 (1개)

sunil anandatheertha
sunil anandatheertha 2012년 1월 19일
Try using this for general purposes: a=clock;a(1),a(2),a(3),a(4),a(5),a(6)
Assuming the 09-08-01 00:56:33 to be,
day-month-year hrs:mins:secs, you can try using the following
a = '09-08-01 00:56:33'
day = str2num(a(1:2))
month = str2num(a(4:5))
year = ...
and so on. Hope this helped..

태그

Community Treasure Hunt

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

Start Hunting!

Translated by