%% Convert the Discount Rate on Treasury Bills Using datetime Inputs
% This example shows how to use datetime inputs to convert the discount rate on Treasury bills into their respective money-market or bond-equivalent yields, given a Treasury bill with the following characteristics.

Discount = 0.0497;
Settle = datetime('01-Oct-02','Locale','en_US');
Maturity = datetime('31-Mar-03','Locale','en_US');
[BEYield MMYield] = tbilldisc2yield(Discount, Settle, Maturity)

% Copyright 2012 The MathWorks, Inc.