In the previous century some programs started counting dates from 1900/01/01.
B4X:
Private startticks As Long = DateUtils.SetDate(1900,1,1)
Dim per As Period = DateUtils.PeriodBetweenInDays(startticks,DateTime.Now)
Log(per.Days) ' between the dates not including
get_date_from_long(45000)
Private Sub get_date_from_long(numdays As Long)
Private dayticks As Long = DateTime.TicksPerDay
Private startticks As Long = DateUtils.SetDate(1900,1,1)
Dim calcticks As Long = startticks + (dayticks * numdays)
Log(DateTime.Date(calcticks))
End Sub
get_date_from_long(45000)
Private Sub get_date_from_long(numdays As Long)
Private dayticks As Long = DateTime.TicksPerDay
Private startticks As Long = DateUtils.SetDate(1900,1,1)
Dim calcticks As Long = startticks + (dayticks * numdays)
Log(DateTime.Date(calcticks))
End Sub