[Gambas-user] Gambas Dates
David Silverwood
the_watchmann at yahoo.com
Sun Nov 24 10:33:11 CET 2019
me again-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.My code:
Public Sub Button5_Click() ' load the record into a form '
Inc Application.Busy
$Request = "SUPPLIER = &1 AND INVOICE_NO = &2"
$Result = conMod.$Con.Edit("Documents", $Request, Trim(cboSupplier.Text), Trim(edtInvoice.Text)) edtRef.Text = $Result!REF edtDate.Text = $Result!DATE ' ... and my date appears one day earlier than it is written in the database... wtf cboSupplier.Text = $Result!SUPPLIER edtInvoice.Text = $Result!INVOICE_NO edtDelivery.Text = $Result!DELIVERY_NOTE edtOrder.Text = $Result!ORDER_NO cboReceipt.Text = $Result!RECEIVED edtAdmin.Text = $Result!ADMIN $Result.Update
$Date = Left(edtDate.Text, 10) edtDate.Text = Format($Date, "yyyy-mm-dd")
$Date = Left(edtAdmin.Text, 10) edtAdmin.Text = Format($Date, "yyyy-mm-dd")
Button1.Enabled = True Button3.Enabled = True Button4.Enabled = True Button2.Enabled = True
Finally Dec Application.Busy
Catch objErr.dhError()
End
Any assistance will be appreciated.
Thx and regards
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191124/e5369db2/attachment-0001.html>
More information about the User
mailing list