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

1 Ansicht (letzte 30 Tage)
The dataset is a 83520x10 table so how would I do that for something of this size?

Antworten (2)

madhan ravi
madhan ravi am 27 Feb. 2019
doc ymd
doc hms

Jeremy Hughes
Jeremy Hughes am 27 Feb. 2019
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')

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by