B4J Question jRDC2 result is a number instead of timestamp [postgresql]

Alexander Stolte

Expert
Licensed User
Longtime User
Hey,

i have a timestamp type on my postgresql table, if i get this timestamp with jRDC2 then i got this number:
B4X:
1555950426000
If i do a select on this table, the timestamp are:
B4X:
2019-04-22 06:27:06

is this a bug or a feature of jRDC2?
 

OliverA

Expert
Licensed User
Longtime User
That's the time/date in milliseconds. Your select statement may make it human readable and the underlying JDBC driver just returns milliseconds. Besides jRDC2 using JDBC, it is not a bug/feature of jRDC2 (it's how the underlying JDBC works).
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
It’s milliseconds, not ticks
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
If you got a string back from MySQL, then use SQL to format PostgreSQL’s output the same instead of handling milliseconds in your client app.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top