Import datetime from .xlsx- different formats in MATLAB

Hi.
I have a problem where I am trying to use the import tool to get times from 2 different columns in an .xlsx file so that I can simply check which is bigger. The 2 columns are in different sheets, I don't expect that would make any difference but thought I should mention it anyway.This seems like an easy problem but when I try to import both as datetime format, 1 column enters MATLAB with a date in 1899; the other doesn't come with a date; the column without date is always larger according to matlab. Importing the data as numbers would also be good but when I try this the columnn that otherwise would not have a date, is set to NaN.
Both columns are formated the same in excel so I don't understand what is happening here.
If anyone can help, it would really be appreciated.

2 Comments

A demo file would be useful.
Is it possible for you to attach your file and the part of your code that reads it? Also, which operating system are you using?

Sign in to comment.

Answers (0)

Asked:

on 2 Oct 2019

Commented:

on 2 Oct 2019

Community Treasure Hunt

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

Start Hunting!