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?
0 个评论
回答(2 个)
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')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!