VBScript Weekday Function - W3Schools

文章推薦指數: 80 %
投票人數:10人

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



請為這篇文章評分?