MATLAB: How can i merge two datetime columns to one

datetime

I have some trouble withe the data import
I have import a Table n with 2 columns (Date,Time) in the datetime format
in the first column (n.Date)is the Date withe the format 'dd.MM.yy' in the second column (n.Time) is the Time with the format 'HH:mm:ss'
How can I great a 3 column withe the datetime format 'dd.MM.yy HH:mm:ss' which i can finaly plot
n.Date=[29.02.16;29.02.16;29.02.16] n.Time=[13:00:00;13:05:00;13:10:00]

Best Answer

If you have stored the dates and times as cell arrays of strings, simple string concatenation would do:
n.Date = {'29.02.16' ; '29.02.16' ; '29.02.16'}
n.Time = {'13:00:00' ; '13:05:00' ; '13:10:00'}
DateTime = strcat(n.Date, {' '}, n.Time)