hello , i want to compare modify time of 2 file .
i got the time of modify by long type but it dosnt work i want to check exact info to compare like day ,hour ... seconds .. how can i do that ?
The File.LastModified property gives the time that the file was last modified (or created, if unmodified) to the millisecond, so no need to convert it to minutes and seconds - just compare the values for the two files.
[By the way, if you need to compare a file modified time with the time of a file uploaded to a net location then you need to correct to UTC.]
If you want to know seconds between dates then do this.
If you want this difference in number of hours, days, etc. use the DateUtils Library instead.
B4X:
Dim d1 As Long = File.LastModified(File.DirApp, "page1.txt")
Dim d2 As Long = File.LastModified(File.DirApp, "trackingRecords.txt")
Log((d2 - d1) / 1000) '# seconds difference, if negative d1 is later than d2