I have a date in a dd.mm.yyyy format i want to know how many days have passed since that date.
What i did is
DateTime.ParseExact("09.10.2018", "dd.mm.yyyy", System.Globalization.CultureInfo.InvariantCulture) - DateTime.ParseExact(Date.Now.Tostring("dd.mm.yyyy"), "dd.mm.yyyy", system.Globalization.CultureInfo.InvariantCulture)
What I have received is:
6.00:06:00 which is obviously false as since 9th of october we had roughly speaking ~60 days. How to fix that ? Why is this happening?
Are there any other better methods to calculate difference between today and some date in a past?