summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03150001.xhp
blob: d3e0e20c84e1fda448cdef3641d47e49fe3bfec3 (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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?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/.
    *
    * This file incorporates work covered by the following license notice:
    *
    *   Licensed to the Apache Software Foundation (ASF) under one or more
    *   contributor license agreements. See the NOTICE file distributed
    *   with this work for additional information regarding copyright
    *   ownership. The ASF licenses this file to you under the Apache
    *   License, Version 2.0 (the "License"); you may not use this file
    *   except in compliance with the License. You may obtain a copy of
    *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
    -->

    <meta>
        <topic id="textsbasicshared03150001xml" indexer="include" status="PUBLISH">
            <title id="tit" xml-lang="en-US">WeekdayName Function [VBA]</title>
            <filename>/text/sbasic/shared/03150001.xhp</filename>
        </topic>
    </meta>

    <body>


    <section id="WeekdayName">
        <bookmark xml-lang="en-US" branch="index" id="bm_id3150499">
            <bookmark_value>WeekdayName function</bookmark_value>
        </bookmark>

        <paragraph id="hd_id3150499" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03150001.xhp" name="WeekdayName Function [VBA]">WeekdayName Function [VBA]</link></paragraph>
        <paragraph id="par_id3151384" role="paragraph" xml-lang="en-US">The WeekdayName function returns the weekday name of a specified day of the week.</paragraph>
    </section>
    <embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
    <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
    <bascode>
        <paragraph id="par_id3143267" role="bascode" localize="false" xml-lang="en-US">WeekdayName(Weekday as Integer [,Abbreviate as Boolean [,FirstDayofWeek as Integer]])</paragraph>
    </bascode>
    <embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
    <paragraph id="par_id3150669" role="paragraph" localize="false" xml-lang="en-US">String</paragraph>
    <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
    <paragraph id="par_id240720170117391741" role="paragraph" xml-lang="en-US"><emph>Weekday</emph>: Value from 1 to 7, Mon­day to Sun­day, whose Week Day Name need to be calculated.</paragraph>
    <paragraph id="par_id24072017011739895" role="paragraph" xml-lang="en-US"><emph>Abbreviate</emph>: Optional. A Boolean value that indicates if the weekday name is to be abbreviated.</paragraph>
    <paragraph id="par_id240720170117395610" role="paragraph" xml-lang="en-US"><emph>FirstDayofWeek</emph>: Optional. Specifies the first day of the week.</paragraph>
    <paragraph role="heading" id="hd_id521512154797683" level="3" xml-lang="en-US">First day of Week:</paragraph>
    <table id="tab_id921512153192034">
        <tablerow>
            <tablecell>
                <paragraph id="par_id921512153192034" role="tablehead" xml-lang="en-US">Named constant</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id611512153251598" role="tablehead" xml-lang="en-US">Value</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id491512153274624" role="tablehead" xml-lang="en-US">Description</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id991512153295301" role="tablecontent" xml-lang="en-US" localize="false">vbUseSystemDayOfWeek</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id571512153316028" role="tablecontent" xml-lang="en-US" localize="false">0</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id611512153338316" role="tablecontent" xml-lang="en-US">Use National Language Support (NLS) API setting</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id291512153514339" role="tablecontent" xml-lang="en-US" localize="false">vbSun­day</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id791512153569394" role="tablecontents" xml-lang="en-US" localize="false">1</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id151512153594420" role="tablecontents" xml-lang="en-US" >Sun­day (default)</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id431512153629070" role="tablecontents" xml-lang="en-US" localize="false">vbMonday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id171512153830709" role="tablecontents" xml-lang="en-US" localize="false">2</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id211512153874765" role="tablecontents" xml-lang="en-US" >Monday</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id1001512153904187" role="tablecontent" xml-lang="en-US" localize="false">vbTuesday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id771512153929215" role="tablecontents" xml-lang="en-US" localize="false">3</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id801512153944376" role="tablecontents" xml-lang="en-US" >Tuesday</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id751512153958407" role="tablecontents" xml-lang="en-US" localize="false">vbWednesday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id91512153983659" role="tablecontents" xml-lang="en-US" localize="false">4</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id551512153998501" role="tablecontents" xml-lang="en-US" >Wednesday</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id681512154016128" role="tablecontents" xml-lang="en-US" localize="false">vbThursday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id871512154041210" role="tablecontents" xml-lang="en-US" localize="false">5</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id121512154054207" role="tablecontents" xml-lang="en-US" >Thursday</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id591512154073632" role="tablecontents" xml-lang="en-US" localize="false">vbFriday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id691512154099442" role="tablecontents" xml-lang="en-US" localize="false">6</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id571512154112044" role="tablecontents" xml-lang="en-US" >Friday</paragraph>
            </tablecell>
        </tablerow>
        <tablerow>
            <tablecell>
                <paragraph id="par_id151512154128303" role="tablecontents" xml-lang="en-US" localize="false">vbSaturday</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id831512154158535" role="tablecontents" xml-lang="en-US" localize="false">7</paragraph>
            </tablecell>
            <tablecell>
                <paragraph id="par_id541512154172107" role="tablecontents" xml-lang="en-US" >Saturday</paragraph>
            </tablecell>
        </tablerow>
    </table>


    <embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
    <paragraph role="paragraph" id="par_id171512156115581" xml-lang="en-US">None</paragraph>
    <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
    <bascode>
        <paragraph role="bascode" id="par_id731512155686932" xml-lang="en-US" localize="false">REM  *****  BASIC  *****</paragraph>
        <paragraph role="bascode" id="par_id141512155672881" xml-lang="en-US" localize="false">Option VBASupport 1</paragraph>
        <paragraph role="bascode" id="par_id741512155700026" xml-lang="en-US" localize="false">Sub Example_WeekdayName</paragraph>
        <paragraph role="bascode" id="par_id321512155714044" xml-lang="en-US" localize="false"> Dim tgf as Integer</paragraph>
        <paragraph role="bascode" id="par_id1001512155732764" xml-lang="en-US" localize="false"> tgf = 6</paragraph>
        <paragraph role="bascode" id="par_id421512155749762" xml-lang="en-US" localize="false"> print tgf &amp;" "&amp; WeekdayName(tgf,False,vbSunday)</paragraph>
        <paragraph role="bascode" id="par_id891512155760344" xml-lang="en-US" localize="false">End Sub</paragraph>
    </bascode>

    <section id="relatedtopics">

        <embed href="text/sbasic/shared/00000003.xhp#VBATimeAndDate"/>
    </section>
</body>

</helpdocument>