• Source
    1. using System;
    2.  
    3. public class Test
    4. {
    5. public static void Main()
    6. {
    7. // your code goes here
    8. var a = 6.55;
    9.  
    10. var dt = DateTime.FromOADate(a*365);
    11.  
    12. var year = Math.Floor(a);
    13.  
    14. var month = Math.Floor((a - year) * 12);
    15.  
    16. Console.WriteLine("{0} year {1} month", dt.Year - 1900, dt.Month);
    17. Console.WriteLine("{0} year {1} month", year, month);
    18. }
    19. }