Source of: /manual/en/function.ibase-timefmt.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibase.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.ibase-timefmt.php',
1 => 'ibase_timefmt',
),
'up' =>
array (
0 => 'ref.ibase.php',
1 => 'Firebird/InterBase Functions',
),
'prev' =>
array (
0 => 'function.ibase-set-event-handler.php',
1 => 'ibase_set_event_handler',
),
'next' =>
array (
0 => 'function.ibase-trans.php',
1 => 'ibase_trans',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.ibase-timefmt" class="refentry">
<div class="refnamediv">
<h1 class="refname">ibase_timefmt</h1>
<p class="verinfo">(PHP 4)</p><p class="refpurpose"><span class="refname">ibase_timefmt</span> — <span class="dc-title">Sets the format of timestamp, date and time type columns returned from queries</span></p>
</div>
<a name="function.ibase-timefmt.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">bool</span> <span class="methodname"><b>ibase_timefmt</b></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$format</tt></span>
[, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$columntype</tt></span>
] )</div>
<p class="para rdfs-comment">
Sets the format of timestamp, date or time type columns returned from
queries.
</p>
<p class="para">
You can set defaults for these formats with the PHP configuration
directives <i>ibase.timestampformat</i>,
<i>ibase.dateformat</i> and
<i>ibase.timeformat</i>.
</p>
<blockquote><p><b class="note">Note</b>:
This function has been removed from PHP 5, use
<a href="function.ini-set.php" class="function">ini_set()</a> instead.
<br />
</p></blockquote>
</div>
<a name="function.ibase-timefmt.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">format</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
Internally, the columns are formatted by c-function strftime(), so
refer to its documentation regarding to the format of the string.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">columntype</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
<i><tt class="parameter">columntype</tt></i>
is one of the constants
<b><tt class="constant">IBASE_TIMESTAMP</tt></b>, <b><tt class="constant">IBASE_DATE</tt></b>
and <b><tt class="constant">IBASE_TIME</tt></b>. If omitted, defaults to
<b><tt class="constant">IBASE_TIMESTAMP</tt></b> for backwards compatibility.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.ibase-timefmt.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns <b><tt class="constant">TRUE</tt></b> on success or <b><tt class="constant">FALSE</tt></b> on failure.
</p>
</div>
<a name="function.ibase-timefmt.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 <b>ibase_timefmt()</b> example</b></p>
<div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">/* InterBase 6 TIME-type columns will be returned in<br /> * the form '05 hours 37 minutes'. */<br /></span><span style="color: #0000BB">ibase_timefmt</span><span style="color: #007700">(</span><span style="color: #DD0000">"%H hours %M minutes"</span><span style="color: #007700">, </span><span style="color: #0000BB">IBASE_TIME</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
</span>
</code></div>
</div>
</div><p>
</p>
</div>
</div><?php manual_footer(); ?>