What is month?
You are using it as a variable. However, if you have not defined it as a variable, then MATLAB is trying to call the month function. However, doing so without inputs will result in this error.
t = datetime('now')
month(t)
% the error you are seeing due to calling the function without inputs
month