%% Calculate the Price for a Treasury Bill Using datetime Inputs
% This example shows how to use datetime inputs to return the price for a Treasury bill, where the settlement date of a Treasury bill is February 10, 2002, the maturity date is August 6, 2002, the discount rate is 3.77%, and the par value is $1000.

Price = prtbill(datetime('10-Feb-2002','Locale','en_US'), datetime('6-Aug-2002','Locale','en_US'), 1000, 0.0377)

% Copyright 2012 The MathWorks, Inc.