[Gambas-user] Gambas Dates
the_watchmann at yahoo.com
Sun Nov 24 16:56:29 CET 2019
well, yes? sqlite stores dates as text?
On Sunday, November 24, 2019, 05:23:08 PM GMT+2, T Lee Davidson <t.lee.davidson at gmail.com> wrote:
The date is stored in the db as text?
And, edtDate is a TextBox?
On 11/24/19 4:33 AM, David Silverwood via User wrote:
> 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
> 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
> $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
> Dec Application.Busy
> Any assistance will be appreciated.
> Thx and regards
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User