Incorrect import of HH:MM data from text file

When I import time data with format HH:MM from a delimited text file into MATLAB with the import wizard, it first sets the format of the column as text. When I select the data and format the time as HH:MM in the import wizard, it adds the year 2012 to it so that all time serial numbers are 734869.XXXXX for all times. I would think that it should be 0.XXXXXX to represent the hours and minutes in serial date format. Where is this 734869 coming from and why is it included in my serial data format of my time?

Answers (1)

By definition, the documentations says:
In MATLAB, serial date number 1 is January 1, 0000.
If date is not given, Matlab assumes first day of current year. You may want to subtract
datenum( '2012-01-01', 'yyyy-mm-dd )

Categories

Asked:

on 27 Sep 2012

Community Treasure Hunt

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

Start Hunting!