Changes

Jump to navigation Jump to search
Created page with "=DAYSBETWEENBASIS(SD, ED, basis)= where *<math>SD</math> represents a start date, *<math>ED</math> represents an end date, and *<math>basis</math> is the type of day count b..."
=DAYSBETWEENBASIS(SD, ED, basis)=

where
*<math>SD</math> represents a start date,
*<math>ED</math> represents an end date, and
*<math>basis</math> is the type of day count basis to use.

DAYSBETWEENBASIS() calculates the number of days between start date and end date with respect to the count basis factor.

== Description ==

DAYSBETWEENBASIS(SD, ED, basis)

*DAYSBETWEENBASIS() returns the number of days from specified start date to end date.
*<math>SD</math> and <math>ED</math> dates should be entered either in 'date format' or 'dates returned using formulas'. If dates are not valid, Calci displays #N/A error message.
*<math>SD</math> date should be &lt; <math>ED</math>, else Calci displays NaN error message.
*<math>basis</math> value is optional. If omitted, Calci assumes it to be 0.
Below table shows the use of <math>basis</math> values:

{| class="wikitable"
|-
! Basis !! Description
|-
| 0 || US (NASD) 30/360
|-
| 1 || Actual/actual
|-
| 2 || Actual/360
|-
| 3 || Actual/365
|-
| 4 || European 30/360
|}

*If <math>basis</math> value is other than 0 to 4, Calci displays #N/A error message.

== Examples ==

DAYSBETWEENBASIS(SD, ED, basis) function with inputs in order is calculated as follows:

<div id="2SpaceContent" class="zcontent" align="left">

{| id="TABLE3" class="SpreadSheet blue"
|- class="even"
| class="sshl_f" | 1/4/2008
| class="sshl_f" |

|- class="odd"
| class="sshl_f" | 10/10/2008
| class="sshl_f" |

|- class="even"
| class="sshl_f" | 4
| class="sshl_f" |

|}

=DAYSBETWEENBASIS(A1,A2,A3) : Calculates the days between the dates mentioned with the inputs <br />in the range A1 to A3 with basis count factor '4'. Returns '''276''' as a result.
=DAYSBETWEENBASIS(DATE(2014,1,1),DATE(2014,4,1)) : Calculates the days between the dates mentioned. <br/>Returns '''90''' as a result.
=DAYSBETWEENBASIS(DATE(2014,1,1),DATE(2015,4,1)) : Calculates the days between the dates mentioned. <br/>Returns '''450''' as a result.

==Related Videos==

{{#ev:youtube|kKx9UXyCsO4|280|center|YEARFRAC}}

== See Also ==

*[[Manuals/calci/YEARFRAC | YEARFRAC]]

== References ==

*[http://en.wikipedia.org/wiki/Date_format_by_country Date Formats]
*[http://en.wikipedia.org/wiki/Calendar_year Calendar Year]
*[http://en.wikipedia.org/wiki/Day_count_convention Basis Convention]




*[[Z_API_Functions | List of Main Z Functions]]

*[[ Z3 | Z3 home ]]
writer
2,661

edits

Navigation menu