<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 22 mag 2019 alle ore 11:29 David Silverwood via User <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_6495445933524921301ydpde282062yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div></div>
<div>Thanks Bruce. I will give it a try!</div><div><br></div><div>Hi, Benoit. I have read the wiki, in fact, my browser currently opens on it. But Gambas/Ubuntu is not playing along. I don't know whether en_ZA.UTF-8 is not supported or badly supported but when gambas loads the date from the sqlite db it is loaded as mm/dd/yyyy hh:mm:ss before attempted conversion and mm/dd/yyyy after attempted conversion, and not as yyyy-mm-dd. My problem comes in with a user(s) having to update the database. It means we have to change the date back to sqlite3 format every time we update a record and with one record having four odd different dates that can become quite time consuming not to mention tedious. Every conversion so far I have attempted has resulted in Gambas literally 'arguing' and 'fixing' it for me...</div><div><br></div><div>I'm a newbie at Gambas having come from a QB/VB6 world to C and Max Reason's xbasic and Freebasic. Having to rewrite this in any of the latter would result in hours of coding which honestly I would rather avoid.</div><div><br></div><div>I am probably going to kick myself eventually for missing something small here but I think this is a good learning curve for me.</div><div><br></div><div>Regards</div><div><br></div><div>David</div><div><br></div>
</div></div></blockquote><div><br></div><div>If you upload a date to a SQLite table with Gambas using this code:<br><br>hResult!birth = Date(1947, 4, 10, 15, 25, 00)<br><br>Actually you write this string in the table field '1947-04-10 15:25:00'<br>As you can see written in the console if you run the code I have attached to this discussion.<br>Note: To see hours and minutes you need to change the code by adding them.<br><br>If you wish to show your client what he wrote in the table use:<br>Print Format(hResult["birth"], "yyyy-mm-dd hh:nn:ss")<br><br>But I don't understand why you should show the date this way.</div><div><br></div><div>Regards</div><div>Gianluigi<br></div></div></div>