32 Section 2: Percentage and Calendar Functions
Example: If you purchased a 120-day option on a piece of land on 14 May 2003,
what would be the expiration date? Assume that you normally express dates in
the day-month-year format.
When D is executed as an instruction in a running program, the calculator
pauses for about 1 second to display the result, then resumes program execution.
Number of Days Between Dates
To calculate the number of days between two given dates:
1. Key in the earlier date and press \.
2. Key in the later date and press gÒ.
The answer shown in the display is the actual number of days between the two
dates, including leap days (the extra days occurring in leap years), if any. In
addition, the HP 12C Platinum also calculates the number of days between the
two dates on the basis of a 30-day month. This answer is held inside the
calculator; to display it, press ~. Pressing ~ again will return the original
answer to the display.
Example: Simple interest calculations can be done using either the actual
number of days or the number of days counted on the basis of a 30-day month.
What would be the number of days counted each way, to be used in calculating
the simple interest accruing from June 3, 2003 to October 14, 2004? Assume that
you normally express dates in the month-day-year format.
Keystrokes Display
gÔ
7.04
Sets date format to day-month-
year. (Display shown assumes
date remains from preceding
example. The full date is not
now displayed because the
display format is set to show
only two decimal places, as
described in Section 5.)
14.052003\
14.05
Keys in date and separates it
from number of days to be
entered.
120gD
11,09,2003 4
The expiration date is 11
September 2003, a Thursday.