summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/scalc/01/func_value.xhp
blob: 2293c1a1039c0876ca0b43316c7ab6347f7bfcd2 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->

<meta>
  <topic id="calcfuncvalue" indexer="include" status="PUBLISH">
    <title id="tit" xml-lang="en-US">VALUE Function</title>
    <filename>/text/scalc/01/func_value.xhp</filename>
  </topic>
</meta>
<body>
  <section id="func_value">
    <bookmark id="bm_id61542230672099" xml-lang="en-US" branch="hid/SC_HID_FUNC_VALUE" localize="false"/>
    <bookmark xml-lang="en-US" branch="index" id="bm_id831542233029549">
      <bookmark_value>VALUE function</bookmark_value>
      <bookmark_value>text functions;convert text to numeric value</bookmark_value>
    </bookmark>
    <h1 id="hd_id881628776094597"><variable id="Value_h1"><link href="text/scalc/01/func_value.xhp" name="function VALUE">VALUE</link></variable></h1>
    <paragraph id="par_id541542230672101" role="paragraph" xml-lang="en-US"><variable id="func_value_desc"><ahelp hid=".">Converts the string representation of a number to numeric form. If the supplied string is a valid date, time, or date-time, the corresponding date-time serial number is returned.</ahelp></variable></paragraph>
  </section>
  <embed href="text/scalc/01/ful_func.xhp#func_head_syntax"/>
  <paragraph role="paragraph" id="par_id701542231253817" xml-lang="en-US"><input>VALUE(Text)</input></paragraph>
  <paragraph role="paragraph" id="par_id621542232197446" xml-lang="en-US"><emph>Text</emph>: A string (in quotation marks), a number, or a reference to a cell containing one of those types, that contains the value to be converted.</paragraph>
  <note id="par_id731628787003937">If the <emph>Text</emph> argument is a string representing a date, time, currency or a numeric value with decimal and thousands separators, the string must comply with current locale settings.</note>
  <embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
  <paragraph role="paragraph" id="par_id451628776707264"><input>=VALUE("1234")</input> returns the numeric value 1234.</paragraph>
  <paragraph role="paragraph" id="par_id101628778036375"><input>=VALUE("+1,234.567")</input> returns 1234.567 (considering en-US locale). Note that the "+" sign could have been omitted.</paragraph>
  <paragraph role="paragraph" id="par_id991628779914913"><input>=VALUE("$100")</input> returns 100 (considering en-US locale). Note that the currency prefix must match the current locale settings.</paragraph>
  <paragraph role="paragraph" id="par_id101628780114427"><input>=VALUE("50%")</input> returns 0.5. Note that the character "%" causes the numeric part to be divided by 100.</paragraph>
  <paragraph role="paragraph" id="par_id731628780240876"><input>=VALUE("07/30/2021")</input> returns 44407 (considering en-US locale) which is the date-time sequence number corresponding to the specified date.</paragraph>
  <paragraph role="paragraph" id="par_id501628780340635"><input>=VALUE("09:20:25")</input> returns 0.389178240740741 which is the date-time sequence number corresponding to the specified time value.</paragraph>
  <tip id="par_id801628779804928">Refer to the <link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/VALUE" name="VALUE Wiki">VALUE</link> wiki page for more details about this function.</tip>

  <section id="relatedtopics">
    <embed href="text/scalc/01/func_datevalue.xhp#datevalue"/>
    <embed href="text/scalc/01/func_numbervalue.xhp#numbervalue_h1"/>
    <embed href="text/scalc/01/func_timevalue.xhp#timevalue"/>
  </section>
</body>
</helpdocument>