Considering that you posted this in the Android part of the forum, is it fair to assume that you can only do the conversion on the Android side? Or do you actually have the option to modify the sql that generated the result?
If it's the latter, then perhaps you can find some clue in this thread:
I have a table with a column abc carrying the unix timestamp (eg. 13898161481435) and I want to run a between dates select. It would be not efficient to do a where TO_CHAR(TO_TIMESTAMP(abc / 1000...
Dim timestamp As String = "2023-08-22T14:41:15.569105992Z"
timestamp = timestamp.Replace("T", " ").Replace("Z", "")
timestamp = timestamp.SubString2(0, 23)
Log(timestamp)
DateTime.DateFormat = "yyyy-MM-dd HH:mm:ss.SSS"
Dim value As Long = DateTime.DateParse(timestamp)
Log(value)
Log(DateTime.Date(value))
Considering that you posted this in the Android part of the forum, is it fair to assume that you can only do the conversion on the Android side? Or do you actually have the option to modify the sql that generated the result?
I would like to leave everything by default. I am currently working on a Supabase class and this is what the API gives me back by default.
I'll try, thanks
I don't think that format is limited to Postgre. It is common. The T is a place holder for a space:
B4X:
Dim s As String = "2023-08-22T14:41:15.569105992Z"
s=s.Replace("T"," ")
DateTime.DateFormat = "yyyy-MM-dd HH:mm:ss.SSSSSSSSS"
Log(DateTime.DateParse(s)) '1692729675569
I don't think that format is limited to Postgre. It is common. The T is a place holder for a space:
B4X:
Dim s As String = "2023-08-22T14:41:15.569105992Z"
s=s.Replace("T"," ")
DateTime.DateFormat = "yyyy-MM-dd HH:mm:ss.SSSSSSSSS"
Log(DateTime.DateParse(s)) '1692729675569
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.