I have an array of date time values. How do I separate Date and time and enter it in separate columns in excel?

1 回表示 (過去 30 日間)
The dataset is a 83520x10 table so how would I do that for something of this size?

回答 (2 件)

madhan ravi
madhan ravi 2019 年 2 月 27 日
doc ymd
doc hms

Jeremy Hughes
Jeremy Hughes 2019 年 2 月 27 日
Assuming you have a datetime array called DateAndTime which is a column vector:
Date = dateshift(DateAndTime,'start','day')
Time = timeofday(DateAndTime)
writetable(table(Date,Time),'file.xlsx')

カテゴリ

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