m2xdate
(Not recommended; use exceltime
) MATLAB date to Excel serial date number
m2xdate
is not recommended. Use the
exceltime
function instead because it accepts
datetime
values as inputs. For more information on updating
your code, see Version History or Replace Discouraged Instances of Serial Date Numbers and Date Strings.
Description
converts MATLAB® serial date numbers, date strings, or DateNum
= m2xdate(MATLABDateNumber
,Convention
)datetime
arrays to Excel® serial date numbers. MATLAB date numbers start with 1
= January 1, 0000 CE,
hence there is a difference of 693960 relative to the 1900 date system, or
695422 relative to the 1904 date system. This function is useful with
Spreadsheet Link™ software.