📄 group__g__date.html
字号:
</table></div><div class="memdoc"><p>Assign the value of a date handle to another one. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date</em> </td><td>- Destination Date handle </td></tr> <tr><td valign="top"></td><td valign="top"><em>date_src</em> </td><td>- Source Date handle</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE on success otherwise FALSE </dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00208">208</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p><p>References <a class="el" href="ocilib__types_8h-source.html#l00496">OCI_Date::con</a>, <a class="el" href="ocilib__types_8h-source.html#l00497">OCI_Date::err</a>, and <a class="el" href="ocilib__types_8h-source.html#l00494">OCI_Date::handle</a>.</p><p>Referenced by <a class="el" href="group__g__collection.html#ge09b3807634cc28c24af6f03b7034dbb">OCI_ElemSetDate()</a>, and <a class="el" href="group__g__usertypes.html#g90cd1ab17692711fcc4aa7791c981065">OCI_ObjectSetDate()</a>.</p></div></div><p><a class="anchor" name="gec864d9e80d658f402e8f08c829feead"></a><!-- doxytag: member="ocilib.h::OCI_DateCheck" ref="gec864d9e80d658f402e8f08c829feead" args="(OCI_Date *date)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT int OCI_API OCI_DateCheck </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Check if the given date is valid. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date</em> </td><td>- Date handle</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd><ul><li>Zero if date is valid</li><li>Any other value means the date is invalid </li></ul></dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00231">231</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p><p>References <a class="el" href="ocilib__types_8h-source.html#l00496">OCI_Date::con</a>, <a class="el" href="ocilib__types_8h-source.html#l00497">OCI_Date::err</a>, and <a class="el" href="ocilib__types_8h-source.html#l00494">OCI_Date::handle</a>.</p></div></div><p><a class="anchor" name="g5c85213e0dc63565c0e5d8151a480010"></a><!-- doxytag: member="ocilib.h::OCI_DateCompare" ref="g5c85213e0dc63565c0e5d8151a480010" args="(OCI_Date *date, OCI_Date *date2)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT int OCI_API OCI_DateCompare </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Compares two date handles. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date</em> </td><td>- Date1 handle </td></tr> <tr><td valign="top"></td><td valign="top"><em>date2</em> </td><td>- Date2 handle</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd><ul><li>-1 if date1 is smaller than date2,</li><li>0 if they are equal</li><li>1 if date1 is greater than date2. </li></ul></dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00254">254</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p><p>References <a class="el" href="ocilib__types_8h-source.html#l00496">OCI_Date::con</a>, <a class="el" href="ocilib__types_8h-source.html#l00497">OCI_Date::err</a>, and <a class="el" href="ocilib__types_8h-source.html#l00494">OCI_Date::handle</a>.</p></div></div><p><a class="anchor" name="ge80eacef54641a68c3b82be85f4a5042"></a><!-- doxytag: member="ocilib.h::OCI_DateCreate" ref="ge80eacef54641a68c3b82be85f4a5042" args="(OCI_Connection *con)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT <a class="el" href="struct_o_c_i___date.html">OCI_Date</a>* OCI_API OCI_DateCreate </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___connection.html">OCI_Connection</a> * </td> <td class="paramname"> <em>con</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Create a local date object. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>con</em> </td><td>- Connection handle</td></tr> </table></dl><dl class="note" compact><dt><b>Note:</b></dt><dd>From version 2.5.0, parameter 'con' can be NULL in order to manipulate dates independently from database connections</dd></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>Return the date handle on success otherwise NULL on failure </dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00127">127</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p></div></div><p><a class="anchor" name="gfa9f51e0977278bc43dafdef13d7fb5e"></a><!-- doxytag: member="ocilib.h::OCI_DateDaysBetween" ref="gfa9f51e0977278bc43dafdef13d7fb5e" args="(OCI_Date *date, OCI_Date *date2)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT int OCI_API OCI_DateDaysBetween </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Return the number of days betWeen two dates. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date</em> </td><td>- Date1 handle </td></tr> <tr><td valign="top"></td><td valign="top"><em>date2</em> </td><td>- Date2 handle</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of days on success otherwise OCI_ERROR on failure </dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00277">277</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p><p>References <a class="el" href="ocilib__types_8h-source.html#l00496">OCI_Date::con</a>, <a class="el" href="ocilib__types_8h-source.html#l00497">OCI_Date::err</a>, and <a class="el" href="ocilib__types_8h-source.html#l00494">OCI_Date::handle</a>.</p></div></div><p><a class="anchor" name="gedf77cfe4bd5dab7909e4c2fb5173b48"></a><!-- doxytag: member="ocilib.h::OCI_DateFree" ref="gedf77cfe4bd5dab7909e4c2fb5173b48" args="(OCI_Date *date)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT boolean OCI_API OCI_DateFree </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Free an <a class="el" href="struct_o_c_i___date.html" title="Oracle internal date representation.">OCI_Date</a> handle. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>date</em> </td><td>- Date handle</td></tr> </table></dl><dl class="warning" compact><dt><b>Warning:</b></dt><dd>Only dates created with <a class="el" href="group__g__date.html#ge80eacef54641a68c3b82be85f4a5042" title="Create a local date object.">OCI_DateCreate()</a> should be freed by <a class="el" href="group__g__date.html#gedf77cfe4bd5dab7909e4c2fb5173b48" title="Free an OCI_Date handle.">OCI_DateFree()</a></dd></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE on success otherwise FALSE </dd></dl><p>Definition at line <a class="el" href="date_8c-source.html#l00144">144</a> of file <a class="el" href="date_8c-source.html">date.c</a>.</p><p>References <a class="el" href="ocilib__types_8h-source.html#l00498">OCI_Date::allocated</a>, and <a class="el" href="ocilib__types_8h-source.html#l00494">OCI_Date::handle</a>.</p><p>Referenced by <a class="el" href="group__g__collection.html#gdf1010d812aa53c3b27d991fa47b4f98">OCI_ElemFree()</a>.</p></div></div><p><a class="anchor" name="g5022740b8e062a289d7d06a2f5bd40ca"></a><!-- doxytag: member="ocilib.h::OCI_DateFromCTime" ref="g5022740b8e062a289d7d06a2f5bd40ca" args="(OCI_Date *date, struct tm *ptm, time_t t)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OCI_EXPORT boolean OCI_API OCI_DateFromCTime </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_c_i___date.html">OCI_Date</a> * </td> <td class="paramname"> <em>date</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct tm * </td> <td class="paramname"> <em>ptm</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">time_t </td> <td class="paramname"> <em>t</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -