I've tried this code and it prints 83 and 84.
What does it print on your device?
B4X:
Sub Activity_Create(FirstTime As Boolean)
DateTime.DateFormat = "dd/MM/yyyy"
Dim date1 As String
Dim date2 As String
Dim tks As Long
Dim dif As Long
date1 = "25/03/2012"
date2 = "02/01/2012" ' format is dd/MM/yyyy
tks = DateTime.DateParse(date1) - DateTime.DateParse(date2)
dif= tks / DateTime.TicksPerDay
Log(dif)
date1 = "26/03/2012"
date2 = "02/01/2012" ' format is dd/MM/yyyy
tks = DateTime.DateParse(date1) - DateTime.DateParse(date2)
dif= tks / DateTime.TicksPerDay
Log(dif)
End Sub