[Solved] How to count and update label without saving in database in vb.net? [closed]


You could set a ‘baseDate’ in your code as ‘1/13/2018’ in order to compare it with today’s date.

Then you just need to get the days in between, and get its “module 3” value:

Dim baseDateString = "14/01/2018"
Dim baseDate As Date = Date.ParseExact(baseDateString, "dd/MM/yyyy", 
        System.Globalization.DateTimeFormatInfo.InvariantInfo)
Dim datetimeBetween = DateTime.Today.Subtract(baseDate)
Dim daysBetween = datetimeBetween.Days
Dim dayNumber = daysBetween Mod 3 +1
Console.WriteLine("day: " & dayNumber)

4

solved How to count and update label without saving in database in vb.net? [closed]