adpUserBirth is an AnotherDatePicker:
Log:
New date: 10/11/1960
Today : 04/18/2018
Days diff.: 7
So, I am 7 days old
Where is my error?
B4X:
Sub adpUserBirth_DateChanged (NewDate As Long)
DateTime.DateFormat = "MM/dd/yyyy" ' just to be sure
Dim PerDiff As Period
PerDiff = DateUtils.PeriodBetween(NewDate, DateTime.Now)
Log("New date: " & DateTime.Date(NewDate))
Log("Today : " & DateTime.Date(DateTime.Now))
Log("Days diff.: " & PerDiff.Days)
End Sub
Log:
New date: 10/11/1960
Today : 04/18/2018
Days diff.: 7
So, I am 7 days old
Where is my error?
Last edited: