MATLAB Answers

How to convert a cell array of datetime to an array of datetime

106 views (last 30 days)
JFz
JFz on 29 May 2018
Answered: Ameer Hamza on 29 May 2018
Hi, Is there a simple way to convert a cell array of datetime to an array of datetime without using cellfun? My cell array looks like:
32×1 cell array
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
I would like it to be just an array of datetime. Thanks for any help.

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 29 May 2018
Try this
array = [cellArray{:}];
[] symbol are necessary to form an array.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

Products


Release

R2018a