merge the formfield patch from ooo-build
[ooovba.git] / helpcontent2 / source / text / scalc / guide / numbers_text.xhp
blob5d8e0a1636fc71b235f9101df79676863076a764
1 <?xml version="1.0" encoding="UTF-8"?>
2 <helpdocument version="1.0">
4 <!--
5 ***********************************************************************
7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 *
9 * Copyright 2008 by Sun Microsystems, Inc.
11 * OpenOffice.org - a multi-platform office productivity suite
13 * $RCSfile: soffice2xmlhelp.xsl,v $
14 * $Revision: 1.12 $
16 * This file is part of OpenOffice.org.
18 * OpenOffice.org is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU Lesser General Public License version 3
20 * only, as published by the Free Software Foundation.
22 * OpenOffice.org is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU Lesser General Public License version 3 for more details
26 * (a copy is included in the LICENSE file that accompanied this code).
28 * You should have received a copy of the GNU Lesser General Public License
29 * version 3 along with OpenOffice.org. If not, see
30 * <http://www.openoffice.org/license.html>
31 * for a copy of the LGPLv3 License.
33 ************************************************************************
34 -->
37 <meta>
38 <topic id="textscalcguidenumbers_textxml" indexer="include" status="PUBLISH">
39 <title xml-lang="en-US" id="tit">Converting Text to Numbers</title>
40 <filename>/text/scalc/guide/numbers_text.xhp</filename>
41 </topic>
42 </meta>
43 <body>
44 <bookmark xml-lang="en-US" branch="index" id="bm_id3145068"><bookmark_value>converting;text to numbers</bookmark_value>
45 <bookmark_value>formats; text as numbers</bookmark_value>
46 </bookmark>
47 <paragraph xml-lang="en-US" id="hd_id0908200901265171" role="heading" level="1" l10n="NEW"><variable id="numbers_text"><link href="text/scalc/guide/numbers_text.xhp" name="Converting Text to Numbers">Converting Text to Numbers</link>
48 </variable></paragraph>
49 <section id="text">
50 <paragraph xml-lang="en-US" id="par_id0908200901265127" role="paragraph" l10n="NEW">Calc converts text inside cells to the respective numeric values if an unambiguous conversion is possible. If no conversion is possible, Calc returns a #VALUE! error.</paragraph>
51 <paragraph xml-lang="en-US" id="par_id0908200901265196" role="paragraph" l10n="NEW">Only integer numbers including exponent are converted, and ISO 8601 dates and times in their extended formats with separators. Anything else, like fractional numbers with decimal separators or dates other than ISO 8601, is not converted, as the text string would be locale dependent. Leading and trailing blanks are ignored.</paragraph>
52 <paragraph xml-lang="en-US" id="par_id0908200901265220" role="paragraph" l10n="NEW">The following ISO 8601 formats are converted:</paragraph>
53 <list type="unordered">
54 <listitem>
55 <paragraph xml-lang="en-US" id="par_id0908200901265288" role="paragraph" l10n="NEW">CCYY-MM-DD</paragraph>
56 </listitem>
57 <listitem>
58 <paragraph xml-lang="en-US" id="par_id0908200901265267" role="paragraph" l10n="NEW">CCYY-MM-DDThh:mm</paragraph>
59 </listitem>
60 <listitem>
61 <paragraph xml-lang="en-US" id="par_id0908200901265248" role="paragraph" l10n="NEW">CCYY-MM-DDThh:mm:ss</paragraph>
62 </listitem>
63 <listitem>
64 <paragraph xml-lang="en-US" id="par_id0908200901265374" role="paragraph" l10n="NEW">CCYY-MM-DDThh:mm:ss,s</paragraph>
65 </listitem>
66 <listitem>
67 <paragraph xml-lang="en-US" id="par_id0908200901265327" role="paragraph" l10n="NEW">CCYY-MM-DDThh:mm:ss.s</paragraph>
68 </listitem>
69 <listitem>
70 <paragraph xml-lang="en-US" id="par_id0908200901265399" role="paragraph" l10n="NEW">hh:mm</paragraph>
71 </listitem>
72 <listitem>
73 <paragraph xml-lang="en-US" id="par_id0908200901265347" role="paragraph" l10n="NEW">hh:mm:ss</paragraph>
74 </listitem>
75 <listitem>
76 <paragraph xml-lang="en-US" id="par_id0908200901265349" role="paragraph" l10n="NEW">hh:mm:ss,s</paragraph>
77 </listitem>
78 <listitem>
79 <paragraph xml-lang="en-US" id="par_id0908200901265342" role="paragraph" l10n="NEW">hh:mm:ss.s</paragraph>
80 </listitem>
81 </list>
82 <paragraph xml-lang="en-US" id="par_id0908200901265491" role="paragraph" l10n="NEW">The century code CC may not be omitted. Instead of the T date and time separator, exactly one space character may be used.</paragraph>
83 <paragraph xml-lang="en-US" id="par_id0908200901265467" role="paragraph" l10n="NEW">If a date is given, it must be a valid Gregorian calendar date. In this case the optional time must be in the range 00:00 to 23:59:59.99999...</paragraph>
84 <paragraph xml-lang="en-US" id="par_id0908200901265420" role="paragraph" l10n="NEW">If only a time string is given, it may have an hours value of more than 24, while minutes and seconds can have a maximum value of 59.</paragraph>
85 <paragraph xml-lang="en-US" id="par_id0908200901265448" role="paragraph" l10n="NEW">The conversion is done for single arguments only, as in =A1+A2, or ="1E2"+1. Cell range arguments are not affected, so SUM(A1:A2) differs from A1+A2 if at least one of the two cells contain a convertible string.</paragraph>
86 <paragraph xml-lang="en-US" id="par_id090820090126540" role="paragraph" l10n="NEW">Strings inside formulas are also converted, such as in ="1999-11-22"+42, which returns the date 42 days after November 22nd, 1999. Calculations involving localized dates as strings inside the formula return an error. For example, the localized date string "11/22/1999" or "22.11.1999" cannot be used for the automatic conversion.</paragraph>
87 </section>
88 <section id="relatedtopics">
89 <embed href="text/scalc/guide/text_numbers.xhp#text_numbers"/>
90 <embed href="text/scalc/guide/integer_leading_zero.xhp#integer_leading_zero"/>
91 <paragraph xml-lang="en-US" id="par_id0908200901265544" role="paragraph" l10n="NEW"><link href="text/shared/01/05020300.xhp" name="Format - Cells - Numbers">Format - Cells - Numbers</link></paragraph>
92 <embed href="text/scalc/guide/format_value.xhp#format_value"/>
93 </section>
94 </body>
95 </helpdocument>