How can I convert the serial date numbers in a text file to calendar dates

1 回表示 (過去 30 日間)
Abigail Waring
Abigail Waring 2021 年 7 月 21 日
回答済み: Star Strider 2021 年 7 月 21 日
I have written a code to extract the x and y data from a plot
but the x data comes out as a serial date number and time and i'd like it in calendar months and time
  4 件のコメント
Cris LaPierre
Cris LaPierre 2021 年 7 月 21 日
Provide an example serial date and corresponding date and time
Abigail Waring
Abigail Waring 2021 年 7 月 21 日
722816.416666667 I believe is 31st dec 1978 10:00:00

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2021 年 7 月 21 日
It appears to be a MATLAB date number, and if so, maps to 1 Jan 1979 10:00:00
DT = datetime(722816.416666667, 'ConvertFrom','datenum')
DT = datetime
01-Jan-1979 10:00:00
.

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by