JSON Dates

jscoulter

Member
Licensed User
Longtime User
Hi All.
I am have some JSON data and part of the data is a date.
However, I need to convert the number in the date part to a date-time.
The date starts at 1 Jan 1970 from memory, so I need to add say the value 1299837600 (which is the seconds since 1 Jan 1970 tothe date I need to get) to 1 Jan 1970 to get the date that needs to be displayed.
I am just not sure how to do this in B4A.

Can someone help/point me in the right direction?

p.s. I am doing the following:
Dim jData As Long
jDate = DateTime.DateParse("1/1/1970")
I just dont see how I can add teh seconds to jDate etc.


Jeremy
 
Last edited:

jscoulter

Member
Licensed User
Longtime User
opps I meant milliseconds not seconds :)

I did infact try jDate = jDate + 1299837600 on the off chance, but of course because my head was in the "seconds" mind set for what ever reason, I didnt think of hte other part....DOH !! :signOops:

Jeremy
 
Upvote 0
Top