VBScript Weekday Function - W3Schools
文章推薦指數: 80 %
The Weekday function returns a number between 1 and 7, that represents the day of the week. Syntax. Weekday(date[,firstdayofweek]). Parameter, Description. date ...
Tutorials
References
Exercises
VideosNEW
Menu
Login
PaidCourses
WebsiteNEW
HTML
CSS
JAVASCRIPT
SQL
PYTHON
PHP
BOOTSTRAP
HOWTO
W3.CSS
JAVA
JQUERY
C++
C#
R
React
Kotlin
×
Tutorials
HTMLandCSS
LearnHTML
LearnCSS
LearnRWD
LearnBootstrap
LearnW3.CSS
LearnColors
LearnIcons
LearnGraphics
LearnSVG
LearnCanvas
LearnHowTo
LearnSass
DataAnalytics
LearnAI
LearnMachineLearning
LearnDataScience
LearnNumPy
LearnPandas
LearnSciPy
LearnMatplotlib
LearnStatistics
LearnExcel
XMLTutorials
LearnXML
LearnXMLAJAX
LearnXMLDOM
LearnXMLDTD
LearnXMLSchema
LearnXSLT
LearnXPath
LearnXQuery
JavaScript
LearnJavaScript
LearnjQuery
LearnReact
LearnAngularJS
LearnJSON
LearnAJAX
LearnAppML
LearnW3.JS
Programming
LearnPython
LearnJava
LearnC++
LearnC#
LearnR
LearnKotlin
LearnGo
ServerSide
LearnSQL
LearnMySQL
LearnPHP
LearnASP
LearnNode.js
LearnRaspberryPi
LearnGit
WebBuilding
CreateaWebsiteNEW
WebTemplates
WebStatistics
WebCertificates
WebDevelopment
CodeEditor
TestYourTypingSpeed
PlayaCodeGame
CyberSecurity
Accessibility
DataAnalytics
LearnAI
LearnMachineLearning
LearnDataScience
LearnNumPy
LearnPandas
LearnSciPy
LearnMatplotlib
LearnStatistics
LearnExcel
LearnGoogleSheets
XMLTutorials
LearnXML
LearnXMLAJAX
LearnXMLDOM
LearnXMLDTD
LearnXMLSchema
LearnXSLT
LearnXPath
LearnXQuery
×
References
HTML
HTMLTagReference
HTMLBrowserSupport
HTMLEventReference
HTMLColorReference
HTMLAttributeReference
HTMLCanvasReference
HTMLSVGReference
GoogleMapsReference
CSS
CSSReference
CSSBrowserSupport
CSSSelectorReference
Bootstrap3Reference
Bootstrap4Reference
W3.CSSReference
IconReference
SassReference
JavaScript
JavaScriptReference
HTMLDOMReference
jQueryReference
AngularJSReference
AppMLReference
W3.JSReference
Programming
PythonReference
JavaReference
ServerSide
SQLReference
MySQLReference
PHPReference
ASPReference
XML
XMLDOMReference
XMLHttpReference
XSLTReference
XMLSchemaReference
CharacterSets
HTMLCharacterSets
HTMLASCII
HTMLANSI
HTMLWindows-1252
HTMLISO-8859-1
HTMLSymbols
HTMLUTF-8
×
ExercisesandQuizzes
Exercises
HTMLExercises
CSSExercises
JavaScriptExercises
SQLExercises
MySQLExercises
PHPExercises
PythonExercises
NumPyExercises
PandasExercises
SciPyExercises
jQueryExercises
JavaExercises
C++Exercises
C#Exercises
RExercises
KotlinExercises
GoExercises
BootstrapExercises
Bootstrap4Exercises
Bootstrap5Exercises
GitExercises
Quizzes
HTMLQuiz
CSSQuiz
JavaScriptQuiz
SQLQuiz
MySQLQuiz
PHPQuiz
PythonQuiz
NumPyQuiz
PandasQuiz
SciPyQuiz
jQueryQuiz
JavaQuiz
C++Quiz
C#Quiz
RQuiz
XMLQuiz
CyberSecurityQuiz
BootstrapQuiz
Bootstrap4Quiz
Bootstrap5Quiz
AccessibilityQuiz
Courses
HTMLCourse
CSSCourse
JavaScriptCourse
FrontEndCourse
SQLCourse
PHPCourse
PythonCourse
NumPyCourse
PandasCourse
DataAnalyticsCourse
jQueryCourse
JavaCourse
C++Course
C#Course
RCourse
XMLCourse
CyberSecurityCourse
AccessibilityCourse
Certificates
HTMLCertificate
CSSCertificate
JavaScriptCertificate
FrontEndCertificate
SQLCertificate
PHPCertificate
PythonCertificate
DataScienceCertificate
Bootstrap3Certificate
Bootstrap4Certificate
jQueryCertificate
JavaCertificate
C++Certificate
ReactCertificate
XMLCertificate
×
Tutorials
References
Exercises
PaidCourses
Spaces
Videos
Shop
ASPTutorials
ASPHOME
WPTutorial
WebPagesIntro
WebPagesRazor
WebPagesLayout
WebPagesFolders
WebPagesGlobal
WebPagesForms
WebPagesObjects
WebPagesFiles
WebPagesDatabases
WebPagesHelpers
WebPagesWebGrid
WebPagesCharts
WebPagesEmail
WebPagesSecurity
WebPagesPublish
WebPagesExamples
WebPagesClasses
ASP.NETRazor
RazorIntro
RazorSyntax
RazorC#Variables
RazorC#Loops
RazorC#Logic
RazorVBVariables
RazorVBLoops
RazorVBLogic
ASPClassic
ASPIntro
ASPSyntax
ASPVariables
ASPProcedures
ASPConditionals
ASPLooping
ASPForms
ASPCookies
ASPSession
ASPApplication
ASP#include
ASPGlobal.asa
ASPAJAX
ASPe-mail
ASPExamples
ASPReference
ASPVBFunctions
ASPVBKeywords
ASPResponse
ASPRequest
ASPApplication
ASPSession
ASPServer
ASPError
ASPFileSystem
ASPTextStream
ASPDrive
ASPFile
ASPFolder
ASPDictionary
ASPAdRotator
ASPBrowserCap
ASPContentLinking
ASPContentRotator
ASPQuickRef
ADOTutorial
ADOIntro
ADOConnect
ADORecordset
ADODisplay
ADOQuery
ADOSort
ADOAdd
ADOUpdate
ADODelete
ADODemo
ADOSpeedUp
ADOObjects
ADOCommand
ADOConnection
ADOError
ADOField
ADOParameter
ADOProperty
ADORecord
ADORecordset
ADOStream
ADODataTypes
VBScriptWeekdayFunction
❮CompleteVBScriptReference
TheWeekdayfunctionreturnsanumberbetween1and7,thatrepresentsthedayoftheweek.
Syntax
Weekday(date[,firstdayofweek])
Parameter
Description
date
Required.Thedateexpressiontoevaluate
firstdayofweek
Optional.Specifiesthefirstdayoftheweek.Cantakethe
followingvalues:
0=vbUseSystemDayOfWeek-UseNationalLanguageSupport(NLS)API
setting
1=vbSunday-Sunday(default)
2=vbMonday-Monday
3=vbTuesday-Tuesday
4=vbWednesday-Wednesday
5=vbThursday-Thursday
6=vbFriday-Friday
7=vbSaturday-Saturday
Example
Example
")
response.write(Weekday("2010-02-16",1)&"
")
response.write(Weekday("2010-02-16",2)&"
")
response.write(Weekday("2010-02-16",3)&"
")
response.write(Weekday("2010-02-16",4)&"
")
response.write(Weekday("2010-02-16",5)&"
")
response.write(Weekday("2010-02-16",6)&"
")
%>
Theoutputofthecodeabovewillbe:
3
3
2
1
7
6
5
ShowExample»
❮CompleteVBScriptReference
NEW
WejustlaunchedW3Schoolsvideos
Explorenow
COLORPICKER
Getcertifiedbycompletingacoursetoday!
w3schoolsCERTIFIED.2021
Getstarted
CODEGAME
PlayGame
延伸文章資訊
- 1Weekday 函數(Visual Basic for Applications) | Microsoft Docs
這個範例會使用Weekday 函數從指定的日期取得一周的第幾天。 VB 複製. Dim MyDate, MyWeekDay MyDate = #February 12, 1969# ' Assi...
- 2VBScript Weekday Function - W3Schools
The Weekday function returns a number between 1 and 7, that represents the day of the week. Synta...
- 3VB weekday()函数的用法 - 百度知道
VB weekday()函数的用法. d1=#2009/4/14#MsgBoxWeekday(d1)不设置参数,系统默认为1,返回3代表星期2如果改为MsgBoxWeekday(d1,2),返回...
- 4VBA WeekDay函數- VBA教學 - 極客書
WeekDay WeekDay函數返回從1到7的整數,代表該日期指定星期的一天。 語法: Weekday ( date [, firstdayofweek ]) 參數說明Date, 必需的參數。...
- 5MS Excel: How to use the WEEKDAY Function (WS, VBA)
As a VBA function, you can use this function in macro code that is entered through the Microsoft ...