%% Price a Portfolio of Treasury Bills Using datetime Input
% Use tbillprice to price a portfolio of Treasury bills using datetime input.

Rate = [0.045; 0.046];
Type = [2 3];

Settle = datetime({'2002-01-02';'2002-03-01'},'InputFormat','yyyy-MM-dd','Locale','en_US');
Maturity = datetime({'2002-06-30';'2002-06-30'},'InputFormat','yyyy-MM-dd','Locale','en_US');
Price = tbillprice(Rate, Settle, Maturity, Type)

% Copyright 2012 The MathWorks, Inc.