<html><head></head><body><div class="ydp65c9a003yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div></div>
<div>Thank you very much Charlie and Gianluigi. Those were pointers in the right direction for me! I really appreciate your help. (Not to mention I just learned a lot from both of your code too.)</div><div><br></div><div><br></div>
</div><div id="ydp8cad57bbyahoo_quoted_6751442980" class="ydp8cad57bbyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Monday, April 29, 2019, 7:24:06 PM GMT+2, Charlie Ogier <charlie@cogier.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="ydp8cad57bbyiv4049803190"><div>
<div class="ydp8cad57bbyiv4049803190moz-cite-prefix">Hi David,<br clear="none">
<br clear="none">
Try this code: -<br clear="none">
<br clear="none">
Dim dDate As Date<br clear="none">
Dim sDate As New String[]<br clear="none">
<br clear="none">
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 clear="none">
<br clear="none">
If edtDate.Text Then<br clear="none">
sDate = Split(edtDate.Text, "-")<br clear="none">
dDate = Date(sDate[0], sDate[1], sDate[2])<br clear="none">
edtDate.Text = Format$(dDate, "dd/mm/yyyy")<br clear="none">
Endif<br clear="none">
<br clear="none">
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 clear="none">
<br clear="none">
<span style="color:rgb(0, 0, 0);font-family:Ubuntu;font-size:medium;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;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 clear="none" style="color:rgb(0, 0, 0);font-family:Ubuntu;font-size:medium;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;text-decoration-color:initial;">
<br clear="none">
Hope that helps,<br clear="none">
<br clear="none">
Charlie<br clear="none">
<br clear="none">
On 29/04/2019 14:40, David Silverwood via User wrote:<br clear="none">
</div>
<blockquote type="cite">
</blockquote></div><div><div class="ydp8cad57bbyiv4049803190yqt1933288209" id="ydp8cad57bbyiv4049803190yqt05380"><div class="ydp8cad57bbyiv4049803190yahoo-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 clear="none">
</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>
</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>
<br clear="none">
</div>
<div>Any but any suggestions/directions would be much
appreciated.</div>
<div><br clear="none">
</div>
<div>Thanks</div>
<div><br clear="none">
</div>
<div>David</div>
</div></div>
<br clear="none">
<fieldset class="ydp8cad57bbyiv4049803190mimeAttachmentHeader"></fieldset>
<pre class="ydp8cad57bbyiv4049803190moz-quote-pre">----[ Gambas mailing-list is hosted by <a shape="rect" class="ydp8cad57bbyiv4049803190moz-txt-link-freetext" href="https://www.hostsharing.net" rel="nofollow" target="_blank">https://www.hostsharing.net</a> ]----
</pre>
<br clear="none">
</div></div><div class="ydp8cad57bbyqt1933288209" id="ydp8cad57bbyqt38177"><br clear="none">----[ Gambas mailing-list is hosted by <a shape="rect" href="https://www.hostsharing.net " rel="nofollow" target="_blank">https://www.hostsharing.net </a>]----<br clear="none"></div></div>
</div>
</div></body></html>