H hung Active Member Licensed User Longtime User Jun 8, 2012 #1 I used the following script to update a table SQL1.ExecNonQuery ("insert into scanlist values('"& lastscan &"', datetime())") althrough the phone's timezone is set to my timezone +8, the record still keeps the gmt time.:sign0085: Is there any way i can update table with my device's system time?
I used the following script to update a table SQL1.ExecNonQuery ("insert into scanlist values('"& lastscan &"', datetime())") althrough the phone's timezone is set to my timezone +8, the record still keeps the gmt time.:sign0085: Is there any way i can update table with my device's system time?
H hung Active Member Licensed User Longtime User Jun 8, 2012 #2 I just upgraded my Huawei Honor to android 4.0.3. Not sure if that cause the probelm. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 10, 2012 #3 You can use DateTime.Now instead of the sql command. Upvote 0
H hung Active Member Licensed User Longtime User Jun 10, 2012 #4 Erel said: You can use DateTime.Now instead of the sql command. Click to expand... That is right. DateTime.Now as client time works. I was thinking that SQLite is running in the devices so the SQLite time should be same as client (the device) but seems not. Upvote 0
Erel said: You can use DateTime.Now instead of the sql command. Click to expand... That is right. DateTime.Now as client time works. I was thinking that SQLite is running in the devices so the SQLite time should be same as client (the device) but seems not.
H hung Active Member Licensed User Longtime User Jun 11, 2012 #5 This is the one run successfully at last: SQL1.ExecNonQuery ("insert into scanlist values('"& lastscan &"', '"& DateTime.Date(DateTime.Now) & " " & DateTime.time(DateTime.Now) &"')") Upvote 0
This is the one run successfully at last: SQL1.ExecNonQuery ("insert into scanlist values('"& lastscan &"', '"& DateTime.Date(DateTime.Now) & " " & DateTime.time(DateTime.Now) &"')")