[Gambas-user] DATE function Gambas 3.8.4 (Distro)
Gianluigi
bagonergi at gmail.com
Mon Apr 29 15:58:17 CEST 2019
Il giorno lun 29 apr 2019 alle ore 15:41 David Silverwood via User <
user at lists.gambas-basic.org> ha scritto:
> Hi
> 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.
> 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.
> My localisation settings for Linux Mint 18.3 KDE are correct.
> How can I convince Gambas to use the local date settings or at least
> format the date to the 'correct' format for our area?
>
> The problem occurs when I load the dates from the database and try and
> format the dates to 'yyyy-mm-dd' using
> If edtDate.Text Then
> dDate = Val(edtDate.Text)
> edtDate.Text = Format$(dDate, "yyyy-mm-dd")
> Endif
>
> Any but any suggestions/directions would be much appreciated.
>
> Thanks
>
> David
>
Hi David,
if I understand the problem, you could download ReportTest from the
Software farm > Examples and see how the project loads the dates into
SQLite and then shows them.
I hope it also works on the 3.8
If instead of installing you just download it you can still see the code.
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190429/fd8a6325/attachment.html>
More information about the User
mailing list