Almost give up how to convert date to epoch, i already try this code but the result is not what i expected:
i really appreciate any help, thank you guys
B4X:
Private Sub ConvertDateToEpoch(day As Int,month As Int,year As Int,hour As Int,minute As Int) As Long
DateTime.DateFormat = "MM/dd/yyyy"
DateTime.TimeFormat= "HH:mm:ss"
Dim dateNow As Long =DateTime.DateParse(month & "/" & day & "/" & year & " " & DateTime.TimeParse(hour & ":" & minute & ":00"))
Dim dateBegin As Long= DateTime.DateParse("01/01/1970" & " " & DateTime.TimeParse("00:00:00" ))
Dim result As Long = (dateNow - dateBegin)/1000
Return result
End Sub
i really appreciate any help, thank you guys