How to import date time format from excel?

I am trying to import excel data that has a date and time stamp, but MATLAB is ignoring it. The date and time is in the A column of excel, and when I use the import data button in MATLAB it only imports the data in the B column. In the excel cell it looks like this:
2016/03/11 15:50:47.689
But the actual data in the cell is:
3/11/2016 3:50:48 PM
This also doesn't make sense because in a slightly different file with the same date format is working.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 25 de Mzo. de 2016
Editada: Azzi Abdelmalek el 25 de Mzo. de 2016
Use xlsread function
[num,text,both]=xlsread('yourfile.xlsx')

2 comentarios

Evan Chou
Evan Chou el 27 de Mzo. de 2016
Thank you! That has worked.
Peter Perkins
Peter Perkins el 16 de Nov. de 2017
In recent versions of MATLAB, you are better off using readtable rather than xlsread.

Iniciar sesión para comentar.

Más respuestas (1)

mantu babu
mantu babu el 6 de Nov. de 2017

0 votos

I also have problem like this and when is use " * _Use xlsread function
[num,text,both]=xlsread('yourfile.xlsx')_** "
function i get the time and date stamp but with 1 day delay. please help

Categorías

Más información sobre Data Import from MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Mzo. de 2016

Comentada:

el 16 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by