%% Compute the Yield of U.S. Treasury Bills Using datetime Inputs
% This example shows how to use datetime inputs to compute the yield of U.S. Treasury bills, given a Treasury bill with the following characteristics.

Price = 98.75;
Settle = datetime('01-Oct-2002','Locale','en_US');
Maturity = datetime('31-Mar-2003','Locale','en_US');
[MMYield, BEYield, Discount] = tbillyield(Price, Settle,Maturity)

% Copyright 2012 The MathWorks, Inc.