from cell to date

275 views (last 30 days)
Johannes Deelstra
Johannes Deelstra on 3 Jul 2017
Answered: Guillaume on 4 Jul 2017
I have a cell variable 201624x1 with values for date from '01/01/1994 01' until '01/01/1994 01' How do I convert these into Matlab dates
Thanks
  3 Comments
per isakson
per isakson on 4 Jul 2017
Edited: per isakson on 4 Jul 2017

Sign in to comment.

Accepted Answer

Guillaume
Guillaume on 4 Jul 2017
datetime(yourcellarray, 'InputFormat', 'dd/MM/yyyy HH')

More Answers (1)

Anushi1998
Anushi1998 on 4 Jul 2017
Use strfun and datetime functions for conversion
  1 Comment
Guillaume
Guillaume on 4 Jul 2017
You probably mean cellfun. There is no strfun in base matlab. In any case, datetime can directly operate on a cell array so cellfun would not even be needed.

Sign in to comment.

Categories

Find more on Dates and Time in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!

Translated by