<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi David,<br>
      <br>
      Try this code: -<br>
      <br>
      Dim dDate As Date<br>
      Dim sDate As New String[]<br>
      <br>
      edtDate.Text = "2019-04-29"         'I presume this is the format
      you get so you can take this line out. It was for me to test.<br>
      <br>
      If edtDate.Text Then<br>
        sDate = Split(edtDate.Text, "-")<br>
        dDate = Date(sDate[0], sDate[1], sDate[2])<br>
        edtDate.Text = Format$(dDate, "dd/mm/yyyy")<br>
      Endif<br>
      <br>
      If you use the ppa you can have the latest version of Gambas. Run
      the following command in Terminal and Gambas 3.13.0 will install.
      You will need a reasonable internet connection.<br>
      <br>
      <span style="color: rgb(0, 0, 0); font-family: Ubuntu; font-size:
        medium; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        text-decoration-style: initial; text-decoration-color: initial;
        display: inline !important; float: none;">sudo
        add-apt-repository -y ppa:gambas-team/gambas3 && sudo
        apt-get update && sudo apt-get -y install gambas3<span> </span></span><br
        style="color: rgb(0, 0, 0); font-family: Ubuntu; font-size:
        medium; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        text-decoration-style: initial; text-decoration-color: initial;">
      <br>
      Hope that helps,<br>
      <br>
      Charlie<br>
      <br>
      On 29/04/2019 14:40, David Silverwood via User wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2077851537.1776294.1556545245218@mail.yahoo.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div class="yahoo-style-wrap" style="font-family:Helvetica Neue,
        Helvetica, Arial, sans-serif;font-size:13px;">
        <div>Hi</div>
        <div>I'm new to the forum so please forgive any mistakes in
          protocol. I am also pretty new to Gambas and have a lot to
          learn, so please forgive once again any stupid questions or
          mistakes.</div>
        <div>Am trying to get Gambas dates to work for me. I have a
          SQLite3 database and as we know SQLite dates are stored as
          YYYY-MM-DD. It seems Gambas dates are stored MM-DD-YYYY which
          in South Africa doesn't work as our local dates are stored
          dd-mm-yyyy. Now, when I format$ my dateboxes/textboxes to read
          yyyy-mm-dd, depending on the date, I either get a blank box or
          the month and day are swopped and therefore also renders the
          date unusable here. </div>
        <div>My localisation settings for Linux Mint 18.3 KDE are
          correct.</div>
        <div>How can I convince Gambas to use the local date settings or
          at least format the date to the 'correct' format for our area?</div>
        <div><br>
        </div>
        <div>The problem occurs when I load the dates from the database
          and try and format the dates to 'yyyy-mm-dd' using</div>
        <div><span>
            <div>  If edtDate.Text Then</div>
            <div>    dDate = Val(edtDate.Text)</div>
            <div>    edtDate.Text = Format$(dDate, "yyyy-mm-dd")</div>
            <div>  Endif</div>
          </span><br>
        </div>
        <div>Any but any suggestions/directions would be much
          appreciated.</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div><br>
        </div>
        <div>David</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
    </blockquote>
    <br>
  </body>
</html>