Conversion of YearFrac in C#

Moyra Bonjean 21 Reputation points
2022-02-12T12:43:12.987+00:00

Hi all,

I am looking for a C# code that will enable the user to find the same Yearfrac coefficient as the one returned using the Yearfrac function in Excel. I have already tried several manners and the best one, for the moment, is dividing the number of years by 365.2425 in the oce. However, I still have small differences, compared to the result I have using Excel.

Could someone help me?

Thanks in advance!

Moyra

Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Ken Tucker 5,861 Reputation points
    2022-02-12T12:55:09.803+00:00

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.