[Gambas-user] Gambas Dates
David Silverwood
the_watchmann at yahoo.com
Sun Nov 24 17:11:28 CET 2019
actually, this brings me to another issue... what happened to the datebox in 3.14? I have a timebox but no datebox? I assume therefore I should be able to put it back into the toolbox somehow?
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?
___
Lee
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
> 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
>
>
>
> ----[ 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...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191124/6b80952a/attachment.html>
More information about the User
mailing list