COUPDAYBS
Financial

Returns the number of days from the beginning of the coupon period to the settlement date

Syntax:

=COUPDAYBS(settlement, maturity, frequency, [basis])

Example:

=COUPDAYBS("1/25/2023", "11/15/2025", 2)