TomDuncan Active Member Licensed User Longtime User Jan 29, 2018 #1 Hi All, I have a field in a mysql table which gives the result like "1517191800" How can I display this as the correct time. (Around 1pm on 29th Jan 2018) Timezone is +11 hrs (10 + daylightsaving) (Hobart, Australia) Tom Last edited: Jan 29, 2018
Hi All, I have a field in a mysql table which gives the result like "1517191800" How can I display this as the correct time. (Around 1pm on 29th Jan 2018) Timezone is +11 hrs (10 + daylightsaving) (Hobart, Australia) Tom
R Roycefer Well-Known Member Licensed User Longtime User Jan 29, 2018 #2 In B4J: B4X: Dim t As Long = YourVal 'YourVal is the result from the table Log($"$DateTime{t*1000}"$) In SQL, you can use the DATETIME method: B4X: SELECT DATETIME(fieldname, 'unixepoch','localtime') FROM tablename WHERE blah blah blah Upvote 0
In B4J: B4X: Dim t As Long = YourVal 'YourVal is the result from the table Log($"$DateTime{t*1000}"$) In SQL, you can use the DATETIME method: B4X: SELECT DATETIME(fieldname, 'unixepoch','localtime') FROM tablename WHERE blah blah blah
TomDuncan Active Member Licensed User Longtime User Jan 29, 2018 #3 Thanks for that works like a charm Upvote 0