If ct = 93 Then 'https://www.b4x.com/android/forum/threads/jrdc2-retrieve-sql-server-datetime2-as-utc.129255/
Log(jrs.RunMethod("getObject", Array(i + 1))) ' Add this log statement to see what is being returned. Should call the object's toString method
Dim tz As JavaObject
tz.InitializeStatic("java.util.TimeZone")
Dim cal As JavaObject
cal.InitializeStatic("java.util.Calendar")
Dim tzUTC As JavaObject = tz.RunMethod("getTimeZone", Array ("UTC"))
Log("tzUTC=" & tzUTC)
Dim SQLTime As JavaObject = jrs.RunMethodJO(DateTimeMethods.Get(ct), Array(i + 1, cal.RunMethod("getInstance", Array(tzUTC))))
Else
Dim SQLTime As JavaObject = jrs.RunMethodJO(DateTimeMethods.Get(ct), Array(i + 1))
End If
If SQLTime.IsInitialized Then
Log("SQLTime=" & SQLTime) ' Timestamp's toString does do a conversion (using your system's local timezone)
row(i) = SQLTime.RunMethod("getTime", Null)
Else
row(i) = Null
End If
Log(row(i)) ' Added log of end result for datetime ticks