http://learn.cemetech.net/index.php?title=TI-BASIC:Dbd&feed=atom&action=historyTI-BASIC:Dbd - Revision history2022-08-14T00:43:04ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=TI-BASIC:Dbd&diff=992&oldid=prevMaintenance script: Initial automated import2016-02-24T18:29:03Z<p>Initial automated import</p>
<p><b>New page</b></p><div>{{Template:TI-BASIC:Command<br />
|picture=DBD.GIF<br />
|summary=Calculates the number of days between two days.<br />
|syntax=dbd(''date1'', ''date2'')<br />
<br />
Date format -- one of:<br />
* DDMM.YY<br />
* MM.DDYY<br />
|location=On the TI-83, press:<br />
# 2nd FINANCE to access the finance menu.<br />
# ALPHA D to select dbd(, or use arrows and ENTER.<br />
<br />
On the TI-83+ or higher, press:<br />
# APPS to access the applications menu.<br />
# ENTER to select Finance...<br />
# ALPHA D to select dbd(, or use arrows and ENTER.<br />
|compatibility=TI-83/84/+/SE<br />
|size=2 bytes<br />
}}<br />
<br />
The dbd( command calculates the number of days between two dates. Each date is encoded as a single number in one of two formats (two formats can be mixed in the same command):<br />
* day, month, year -- DDMM.YY (e.g. April 26, 1989 would be 2604.89)<br />
* month, day, year -- MM.DDYY (e.g. April 26, 1989 would be 04.2689 or just 4.2689)<br />
<br />
Because this is just a number like any other, leading zeroes and trailing zeroes after the decimal can be dropped. For example, January 1, 2000 does not have to be formatted as 0101.00 but can be simply 101.<br />
<br />
Since there are only two digits for the year, obviously only a century's worth of dates can be handled. The calculator assumes this range to be from January 1, 1950 to December 31, 2049.<br />
<br />
If the second date comes before the first, dbd( will return a negative number of days, so the range of possible results is from -36524 to 36524.<br />
<br />
Finally, dbd( will also work for list inputs in the usual manner: a single date will be compared against every date in a list, and two lists of dates will be paired up.<br />
<br />
dbd(612.07,2512.07<br />
19<br />
dbd(1.0207,1.0107<br />
-1<br />
dbd(1.0107,{2.0107,3.0107,4.0107})<br />
{31 59 90}<br />
<br />
<br />
= Advanced Uses =<br />
<br />
The dbd( command can be used to calculate the [[TI-BASIC:Day_Of_Week|Day_Of_Week]] without using the [[TI-BASIC:Dayofwk|DayOfWk(]] command, which is only available on the TI-84+ and TI-84+ SE.<br />
<br />
= Error Conditions =<br />
<br />
* '''[[TI-BASIC:Errors#domain|ERR:DOMAIN]]''' is thrown if a date is improperly formatted.<br />
<br />
= Related Commands =<br />
<br />
* [[TI-BASIC:Dayofwk|DayOfWk(]]<br />
<br />
= See Also =<br />
<br />
* [[TI-BASIC:Day_Of_Week|Day_Of_Week]][[Category:TI-BASIC]]<br />
[[Category:TIBD]]</div>Maintenance script