I have a date in the future, and I want to find out how many weeks this happens.
(futureDate - DateTime.Today).TotalDays / 7
I think you better spend the days and divide it by 7
DateTime start = DateTime.Now; DateTime end = DateTime.Now.AddDays(21); double noOfDays = (end - start).TotalDays; double noOfWeeks = noOfDays / 7;
Source: https://habr.com/ru/post/1735804/More articles:import strategy in django applications - pythonSCJP question: ambiguous method - javaWhat happened to determining the .NET version with v4.0? - c #Manage multiple layouts in Visual Studio - visual-studioHow to get a windowless application in Ogre? - windowsOgre 3d: RenderTexture is bigger than RenderWindow - c ++Как создать собственную HashMap в Java? - javaVersioning Guidelines - databaseKernel master data: NSFetchRequest with individual properties and alphabet sections - iphoneToo much time to load a page using HttpWebResponse - c #All Articles