Does anyone know why the following function gives a different value depending on whether returns int or string?
B4X:
Sub fncMakeId () As Int 'if string returns a different value
Dim datFecha As Long
DateTime.DateFormat = "yyyyMMdd"
DateTime.TimeFormat = "hhmmssSSS"
datFecha = DateTime.Now
Return DateTime.Date(datFecha) & DateTime.Time(datFecha)
End Sub
It would be easier to answer you if you told us what exactly you want to do !
A date and time is stored in a Long type variable, this you get with DateTime.Now, Long is a long Integer !
So what do you expect with Return DateTime.Date(datFecha) & DateTime.Time(datFecha) ?
Knowing that DateTime.Date(datFecha) returns a String !