[Gambas-bugtracker] Bug #2150: Possible error in Format

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Fri Apr 2 12:11:44 CEST 2021


http://gambaswiki.org/bugtracker/edit?object=BUG.2150&from=L21haW4-

Comment #5 by Benoît MINISINI:

It's not a trick. It's logical.

The old behaviour supposed that all date elements have a separator, and the same one. Which is not true.

If the local date format is "dd/mm/yyyy", like in French, there is a date separator after the day, after the month, but not after the year. And "/" is the local date element separator in Format$(), so you get nothing after the year.

When you write Format(date, "yyyy/mm/dd"), you actually want a non-local format (I guess), so the "/" does not mean "the local date element separator", but a true "/". So it's perfectly logical you have to quote it.




More information about the Bugtracker mailing list