This is a very basic programming error. Assuming you are a beginner I've choosen a special app name
for my example...
Read about implicit and explicit casting, basic datatypes and precision. These are topics you come across in every programming language - you have to know it!
using System;
namespace ReadChapterOneOfAnyNETBook
{
class Program
{
static void Main(string[] args)
{
DateTime startDate = DateTime.Now.AddDays(-57d);
DateTime endDate = DateTime.Now;
TimeSpan ts = endDate - startDate;
float numberOfMonths = (float) ts.TotalDays / 30f;
Console.WriteLine(numberOfMonths);
Console.ReadKey();
}
}
}