<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">me again-</div><div dir="ltr" data-setdir="false">I have the strangest thing happening when I load a record in my SQLite database. Gambas reads the dates then subtracts a day. So instead of say 2019-11-22 which is the actual date in the db, Gambas loads 2019-11-21. I cannot think that this is supposed to happen.</div><div dir="ltr" data-setdir="false">My code:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div><font color="#8fca40">Public Sub Button5_Click() ' load the record into a form</font></div><div><font color="#8fca40"> '</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> Inc Application.Busy</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> $Request = "SUPPLIER = &1 AND INVOICE_NO = &2"</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> $Result = conMod.$Con.Edit("Documents", $Request, Trim(cboSupplier.Text), Trim(edtInvoice.Text))</font></div><div><font color="#8fca40"> edtRef.Text = $Result!REF</font></div><div><font color="#8fca40"> edtDate.Text = $Result!DATE </font><font color="#808080">' ... and my date appears one day earlier than it is written in the database... wtf</font></div><div><font color="#8fca40"> cboSupplier.Text = $Result!SUPPLIER</font></div><div><font color="#8fca40"> edtInvoice.Text = $Result!INVOICE_NO</font></div><div><font color="#8fca40"> edtDelivery.Text = $Result!DELIVERY_NOTE</font></div><div><font color="#8fca40"> edtOrder.Text = $Result!ORDER_NO</font></div><div><font color="#8fca40"> cboReceipt.Text = $Result!RECEIVED</font></div><div><font color="#8fca40"> edtAdmin.Text = $Result!ADMIN</font></div><div><font color="#8fca40"> $Result.Update</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> $Date = Left(edtDate.Text, 10)</font></div><div><font color="#8fca40"> edtDate.Text = Format($Date, "yyyy-mm-dd")</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> $Date = Left(edtAdmin.Text, 10)</font></div><div><font color="#8fca40"> edtAdmin.Text = Format($Date, "yyyy-mm-dd")</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40"> Button1.Enabled = True</font></div><div><font color="#8fca40"> Button3.Enabled = True</font></div><div><font color="#8fca40"> Button4.Enabled = True</font></div><div><font color="#8fca40"> Button2.Enabled = True</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40">Finally</font></div><div><font color="#8fca40"> Dec Application.Busy</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40">Catch</font></div><div><font color="#8fca40"> objErr.dhError()</font></div><div><font color="#8fca40"><br></font></div><div><font color="#8fca40">End</font></div></div><div><br></div><div dir="ltr" data-setdir="false">Any assistance will be appreciated.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Thx and regards</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">David</div><br></div></div></body></html>