You should use DateUtils. Starting from v2.70 (beta) it is included as a library. For previous versions you should download the code module from the forum:
B4X:
Sub Activity_Create(FirstTime As Boolean)
DateTime.DateFormat = "yyMMdd"
Dim startDate As Long = DateTime.DateParse("130427")
Dim endDate As Long = DateTime.DateParse("130515")
Dim p As Period = DateUtils.PeriodBetweenInDays(startDate, endDate)
Log(p.Days)
End Sub