Convert date timestamp into Datenum

조회 수: 1 (최근 30일)
Life is Wonderful
Life is Wonderful 2019년 8월 13일
편집: Life is Wonderful 2020년 1월 28일
I want to convert date timestamp into one number

채택된 답변

Guillaume
Guillaume 2019년 8월 13일
a) You shouldn't be using datenum. They're completely obsolete and everything you could do with them, you can do with datetime, and more.
b) The way a number is stored and the way a number is displayed are two completely different things. You can change the way matlab displays numbers at the command window wth the format command. Note that this will in no way affect the actual number, nor will it affects the way it is exported in a text or excel file. Again, this only affects the display in the command window
>> dn = now;
>> format short %change the format. DOES NOT CHANGE what's into dn
>> dn
dn =
7.3765e+05
>> format long
>> dn
dn =
7.376506267945486e+05
>> format longg %You probably want this format
>> dn
dn =
737650.626794549
  댓글 수: 4
Guillaume
Guillaume 2019년 8월 13일
I can't see any equation and I've really no idea what you're asking now.
Life is Wonderful
Life is Wonderful 2019년 12월 7일
Hi Guillaume,
Can you please look into the topic and help me please..
Thank you!!

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

추가 답변 (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