1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<refentry id="fn_datestring_gmt">
<refmeta>
<refentrytitle>datestring_GMT</refentrytitle>
<refmiscinfo>time</refmiscinfo>
</refmeta>
<refnamediv>
<refname>datestring_GMT</refname>
<refpurpose>convert a timestamp to external format string in GMT</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis id="fsyn_datestring_gmt">
<funcprototype id="fproto_datestring_gmt">
<funcdef><function>datestring_GMT</function></funcdef>
<paramdef>in <parameter>dt</parameter> datetime</paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="desc_datestring_gmt"><title>Description</title>
<para>Converts the local datetime to GMT and returns its
external representation as a string.</para></refsect1>
<refsect1 id="params_datestring_gmt"><title>Parameters</title>
<refsect2><title>dt</title>
<para>A <type>datetime</type> value.</para>
</refsect2>
</refsect1>
<refsect1 id="ret_datestring_gmt"><title>Return values</title>
<para>A <type>VARCHAR</type> containing the external representation.</para>
</refsect1>
<!-- <refsect1 id="errors"><title>Errors</title>
<table><title>Errors signalled by <function>datestring</function> and
<function>stringdate</function></title>
<tgroup cols="4">
<tbody>
<row>
<entry>SQLState</entry>
<entry>Error Code</entry>
<entry>Error Text</entry>
<entry>Description</entry>
</row>
<row>
<entry><errorcode>22007</errorcode></entry>
<entry><errorcode>DT001</errorcode></entry>
<entry><errorname>Function %s needs a datetime, date or time as argument
%d, not an arg of type %s (%d)</errorname></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1> -->
<refsect1 id="examples_datestring_gmt"><title>Examples</title>
<example id="ex_datestring_gmt"><title>Example with datestring_GMT</title>
<para>We are at central european time zone CET(GMT+1).</para>
<screen>SQL> use Demo;
Done. -- 3 msec.
SQL> select (datestring_GMT (stringdate ('2000-01-01 22:00')));
callret
VARCHAR
_______________________________________________________________________________
2000-01-01 21:00:00.000000
1 Rows. -- 45 msec.
</screen></example>
</refsect1>
<refsect1 id="seealso_datestring_gmt"><title>See Also</title>
<para><link linkend="fn_datestring"><function>datestring</function></link>,
<link linkend="fn_stringdate"><function>stringdate</function></link></para>
<para> The discussion of
<link linkend="DTTIMESTAMP"><type>TIMESTAMP</type></link>
datatype in section <link linkend="coredbengine">Database Concepts</link>
of the documentation.</para>
</refsect1>
</refentry>
|