<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >ibase_timefmt</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="Firebird/InterBase Functions" HREF="ref.ibase.html"><LINK REL="PREVIOUS" TITLE="ibase_set_event_handler" HREF="function.ibase-set-event-handler.html"><LINK REL="NEXT" TITLE="ibase_trans" HREF="function.ibase-trans.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.ibase-set-event-handler.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.ibase-trans.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.ibase-timefmt" ></A >ibase_timefmt</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN57655" ></A ><P > (PHP 3 >= 3.0.6, PHP 4)</P >ibase_timefmt -- Sets the format of timestamp, date and time type columns returned from queries </DIV ><DIV CLASS="refsect1" ><A NAME="AEN57658" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >ibase_timefmt</B > ( string format [, int columntype] )<BR ></BR ><P > 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 its documentation regarding to the format of the string. <CODE CLASS="parameter" >columntype</CODE > is one of the constants IBASE_TIMESTAMP, IBASE_DATE and IBASE_TIME. If omitted, defaults to IBASE_TIMESTAMP for backwards compatibility. </P ><P > <DIV CLASS="informalexample" ><P ></P ><A NAME="AEN57672" ></A ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br /> </font><font color="#FF8000">/* InterBase 6 TIME-type columns will be returned in<br /> * the form '05 hours 37 minutes'. */<br /> </font><font color="#0000BB">ibase_timefmt</font><font color="#007700">(</font><font color="#DD0000">"%H hours %M minutes"</font><font color="#007700">, </font><font color="#0000BB">IBASE_TIME</font><font color="#007700">);<br /></font><font color="#0000BB">?></font> </font> </code></TD ></TR ></TABLE ><P ></P ></DIV > </P ><P > You can set defaults for these formats with the PHP configuration directives ibase.timestampformat, ibase.dateformat and ibase.timeformat. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > This function has been removed from PHP 5, use <A HREF="function.ini-set.html" ><B CLASS="function" >ini_set()</B ></A > instead. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.ibase-set-event-handler.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.ibase-trans.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >ibase_set_event_handler</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.ibase.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ibase_trans</TD ></TR ></TABLE ></DIV ></BODY ></HTML >