php-doc-en/reference/ibase/functions/ibase-timefmt.xml

79 lines
2.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/ibase.xml, last change in rev 1.2 -->
<refentry id="function.ibase-timefmt">
<refnamediv>
<refname>ibase_timefmt</refname>
<refpurpose>
Sets the format of timestamp, date and time type columns returned from queries
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ibase_timefmt</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>columntype</parameter></methodparam>
</methodsynopsis>
<para>
Sets the format of timestamp, date or time type columns returned
from queries. Internally, the columns are formatted by c-function
strftime(), so refer to it's documentation regarding to the format
of the string. <parameter>columntype</parameter> is one of the
constants IBASE_TIMESTAMP, IBASE_DATE and IBASE_TIME. If omitted,
defaults to IBASE_TIMESTAMP for backwards compatibility.
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// InterBase 6 TIME-type columns will be returned in
// the form '05 hours 37 minutes'.
ibase_timefmt("%H hours %M minutes", IBASE_TIME);
?>
]]>
</programlisting>
</informalexample>
</para>
<para>
You can also set defaults for these formats with PHP configuration
directives ibase.timestampformat, ibase.dateformat and ibase.timeformat.
</para>
<note>
<para>
<parameter>columntype</parameter> was added in PHP 4.0. It has any
meaning only with InterBase version 6 and higher.
</para>
</note>
<note>
<para>
A backwards incompatible change happened in PHP 4.0 when PHP
configuration directive ibase.timeformat was renamed to
ibase.timestampformat and directives ibase.dateformat and
ibase.timeformat were added, so that the names would match better
their functionality.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->