On 9-11-2018 13:38, i...@synapsesoftware.co.uk [firebird-support] wrote:
> I use Firebird primarily with Delphi and have had no problems with using 
> and displaying dates (suitable for my country - UK.)
> 
> However, it seems to be a big problem with Firebird and dates when 
> working with PhP with  firebird driver. I have a number of fields that 
> hold information in a field defined to be of type  "date" in Firebird. 
> When I use PhP to query my database I get the fields formatted in the 
> ISO-8601 format (year/month/day.. etc).

Disclaimer: I don't use PHP, but a quick google suggested 
https://secure.php.net/manual/bg/function.ibase-timefmt.php; that seems 
to be a function that has been removed, but one of the comments suggested:

```
/**
* Constant definitions that has been removed from PHP 5
*/
const IBASE_DATE = "ibase.dateformat";
const IBASE_TIME = "ibase.timeformat";
const IBASE_TIMESTAMP = "ibase.timestampformat";

/**
* Sets the format of timestamp, date or time type
* columns returned from queries
*/
function ibase_timefmt($format, $where = IBASE_TIMESTAMP)
{
     ini_set($where, $format);
}
```

And https://secure.php.net/manual/en/ibase.installation.php (see first 
comment) suggests this can also be configured in the php.ini file.

Mark
-- 
Mark Rotteveel
  • Re: [fi... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
    • Re... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • ... i...@synapsesoftware.co.uk [firebird-support]
        • ... Lester Caine les...@lsces.co.uk [firebird-support]
          • ... i...@synapsesoftware.co.uk [firebird-support]
            • ... Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
              • ... i...@synapsesoftware.co.uk [firebird-support]
      • ... i...@synapsesoftware.co.uk [firebird-support]

Reply via email to