I'm working on a simple program that calculates how old a member is and applies the correct membership fee based on age.
public static DateTime DateTime()
{
DateTime birth = new System.DateTime(1991, 9, 20);
DateTime today = new System.DateTime(2017, 1, 22);
TimeSpan age = today - birth;
Console.WriteLine(age);
return birth;
}
Here is the code I'm using, my return value is
9256.00:00:00
How can parse this into a more readable yyyy,mm,dd format?