Kevin Rodríguez
New Member
Hello, I'm having a problem with my code, i want to Check the difference (In days) Between two DateTime (Long) Elements.
This is my code:
Last_time is a string that contains a Date from MSAccess Converted to String (like 23/05/2013) (dd/mm/yyyy)
But it throws a Java.Lang.NumberFormatException
Value of Y = 1369180800000
Value of T = 1399058075661
Help?
This is my code:
B4X:
Dim Y, T, TP As Long
Dim S, M, H, D As Int
DateTime.DateFormat = "dd/MM/yyyy"
Y= DateTime.DateParse(Last_Time)
T= DateTime.Now
Y= DateTime.Date(Y) + DateTime.TimeParse("00:00:01")
T= DateTime.Date(T) + DateTime.TimeParse("00:00:01")
TP= T- Y
S= Round(TP/ 1000)
M= Floor(S/ 60) Mod 60
H= Floor(S/ 3600)
D= Floor(H/ 24)
Last_time is a string that contains a Date from MSAccess Converted to String (like 23/05/2013) (dd/mm/yyyy)
But it throws a Java.Lang.NumberFormatException
Value of Y = 1369180800000
Value of T = 1399058075661
Help?