フィルターのクリア

how to convert date to numbers

1 回表示 (過去 30 日間)
Boss Man
Boss Man 2020 年 2 月 25 日
コメント済み: Star Strider 2020 年 2 月 25 日
so i have 200 dates on my data from 1st october....
i wanted to know if there was a trick to numbering the dates,
e.g. making 1st october=1
2nd october=2 etc
  6 件のコメント
Boss Man
Boss Man 2020 年 2 月 25 日
fixed the date problem with readtable,it displays the date now
i now get this error when using day(t)
Undefined function 'day' for input arguments of type 'table'.
dpb
dpb 2020 年 2 月 25 日
The variable t is your table; NOT the date variable inside the table. If it is named something original like 'Date', say, then
da=day(t.Date);

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

採用された回答

Star Strider
Star Strider 2020 年 2 月 25 日
I showed you how to read them and do other operations on them in: How to combine date and time.
That also converts them to date numbers, and from there you can number them as you wish. The integer part of a date number are days, and the fractional parts are fractions of a day.
  2 件のコメント
Boss Man
Boss Man 2020 年 2 月 25 日
thanks :)
Star Strider
Star Strider 2020 年 2 月 25 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series Objects についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by