MATLAB: I am not getting the correct answer when using datetime function

datetime

Hi everyone,
I am using the following function
datetime(1,43100,1)
but instead of getting '31/12/2017' as an answer (as given from Excel), I am getting 01-Aug-3592. Apparently, I am missing something in the datetime function but don't know what it is.
Thanks in advance for your time.

Best Answer

>> datetime(43100,'ConvertFrom','excel')
ans =
datetime
31-Dec-2017 00:00:00
>>
You tried converting from (yr,mo,day) --> (1, 43100, 1) instead.