MATLAB Answers

0

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

Asked by Fatemah Ebrahim on 27 Feb 2019
Latest activity Answered by Jeremy Hughes on 27 Feb 2019
The dataset is a 83520x10 table so how would I do that for something of this size?

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by madhan ravi
on 27 Feb 2019

doc ymd
doc hms

  0 Comments

Sign in to comment.


Answer by Jeremy Hughes on 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')

  0 Comments

Sign in to comment.