<html><head></head><body><div class="ydp18bfbb52yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">well, yes? sqlite stores dates as text?</div><div><br></div>
</div><div id="yahoo_quoted_4932737836" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Sunday, November 24, 2019, 05:23:08 PM GMT+2, T Lee Davidson <t.lee.davidson@gmail.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">The date is stored in the db as text?<br clear="none">And, edtDate is a TextBox?<br clear="none"><br clear="none"><br clear="none">___<br clear="none">Lee<br clear="none"><br clear="none"><div class="yqt1771191824" id="yqtfd04681"><br clear="none">On 11/24/19 4:33 AM, David Silverwood via User wrote:<br clear="none">> me again-<br clear="none">> I have the strangest thing happening when I load a record in my SQLite database. Gambas reads the dates then subtracts a day. So <br clear="none">> 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 <br clear="none">> happen.<br clear="none">> My code:<br clear="none">> <br clear="none">> Public Sub Button5_Click() ' load the record into a form<br clear="none">> '<br clear="none">> <br clear="none">> Inc Application.Busy<br clear="none">> <br clear="none">> $Request = "SUPPLIER = &1 AND INVOICE_NO = &2"<br clear="none">> <br clear="none">> $Result = conMod.$Con.Edit("Documents", $Request, Trim(cboSupplier.Text), Trim(edtInvoice.Text))<br clear="none">> edtRef.Text = $Result!REF<br clear="none">> edtDate.Text = $Result!DATE ' ... and my date appears one day earlier than it is written in the database... wtf<br clear="none">> cboSupplier.Text = $Result!SUPPLIER<br clear="none">> edtInvoice.Text = $Result!INVOICE_NO<br clear="none">> edtDelivery.Text = $Result!DELIVERY_NOTE<br clear="none">> edtOrder.Text = $Result!ORDER_NO<br clear="none">> cboReceipt.Text = $Result!RECEIVED<br clear="none">> edtAdmin.Text = $Result!ADMIN<br clear="none">> $Result.Update<br clear="none">> <br clear="none">> $Date = Left(edtDate.Text, 10)<br clear="none">> edtDate.Text = Format($Date, "yyyy-mm-dd")<br clear="none">> <br clear="none">> $Date = Left(edtAdmin.Text, 10)<br clear="none">> edtAdmin.Text = Format($Date, "yyyy-mm-dd")<br clear="none">> <br clear="none">> Button1.Enabled = True<br clear="none">> Button3.Enabled = True<br clear="none">> Button4.Enabled = True<br clear="none">> Button2.Enabled = True<br clear="none">> <br clear="none">> Finally<br clear="none">> Dec Application.Busy<br clear="none">> <br clear="none">> Catch<br clear="none">> objErr.dhError()<br clear="none">> <br clear="none">> End<br clear="none">> <br clear="none">> Any assistance will be appreciated.<br clear="none">> <br clear="none">> Thx and regards<br clear="none">> <br clear="none">> David</div><br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> ----[ Gambas mailing-list is hosted by <a shape="rect" href="https://www.hostsharing.net " target="_blank">https://www.hostsharing.net </a>]----<br clear="none">> <br clear="none"><br clear="none">----[ Gambas mailing-list is hosted by <a shape="rect" href="https://www.hostsharing.net " target="_blank">https://www.hostsharing.net </a><div class="yqt1771191824" id="yqtfd60066">]----<br clear="none"></div></div></div>
</div>
</div></body></html>