%% Shift Current Date to Start of Year
% Create a datetime value with the current date.

t = datetime('today')

%
% Shift the date to the start of the year.

t2 = dateshift(t,'start','year')

% Copyright 2021 The MathWorks, Inc.