VBA Function WEEKDAYNAME - BetterSolutions.com

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

WEEKDAYNAME(weekday [,abbreviate] [,firstdayofweek]) ... * If "abbreviate" = True then the weekday name will be abbreviated to three characters. * If "abbreviate" ... HomeBetterSolutions.comOnlineDocumentationMicrosoftOfficeExcelMicrosoftOfficeWordVBAProgrammingC#ProgrammingJavaScriptProgrammingMicrosoftOfficeExcelWorkbooksWorksheetsRowsColumnsCellsRangesDataValidationDataAnalysisPivotTablesPowerQuerySearchExcel...FunctionsUserDefinedFormulasArrayFormulasReviewingTrackChangesNamedRangesConditionalFormatMicrosoftWordTablesChartsDatesTimesFormattingIllustrationsPageLayoutImportingXMLMicrosoftPowerPointRibbonOptionsShortcutKeysProtectionAdd-insMacrosTemplatesQuantFinanceMicrosoftOutlookMicrosoftOfficeExcelWorksheetFunctionsListRibbonTabsExplainedKeyboardShortcutKeysQuantitativeFinanceSearchExcel...VBAProgrammingCodeEditorBestPracticesMacrosSyntaxArraysCollectionsErrorHandlingDebuggingSearchVBA...DataTypesVariablesStringsNumbersDatesTextFilesDirectoriesXMLQuestionsFunctionsSubroutinesMsgBoxInputBoxUserformsControlsEventsDatabasesJSProgrammingRibbonOptionsShortcutKeysEnumerationsClassModulesReferencesWebServicesSQLC#ProgrammingVBAProgrammingCompleteFunctionsListRecordingMacrosSyntaxAndLoopsBestPracticesSearchVBA...BespokeDevelopmentOfficeAdd-inDevelopmentJavaScriptOfficeAdd-insVSTOandC#IntegrationMacrosandVBAProgrammingHighValueConsultancyGetInTouchVBA>FunctionsVBAProgrammingFunctionsWEEKDAYNAMEDates&TimesCompleteListAlphabetical-WIndex-WUpdated:02December202102December2021WEEKDAYNAME(weekday[,abbreviate][,firstdayofweek])Returnsthedayoftheweekasastring(String).weekdayThenumericdesignationforthedayoftheweek(Integer).abbreviate(Optional)Whethertheweekdaynameisabbrevated(Boolean):False=theweekdaynameisnotabbreviated(default)True=theweekdaynameisabbreviatedfirstdayofweek(Optional)AvbDayOfWeekconstantthatspecifiesthefirstdayoftheweek(Integer):0=vbUseSystemDayOfWeek(default)1=vbSunday2=vbMonday3=vbTuesday4=vbWednesday5=vbThursday6=vbFriday7=vbSaturdayREMARKS*If"abbreviate"=Truethentheweekdaynamewillbeabbreviatedtothreecharacters.*If"abbreviate"=Falsethentheweekdaynamewillnotbeabbreviated.*If"abbreviate"isleftblank,thenFalseisused.*If"firstdayofweek"isleftblank,then0isused.*If"firstdayofweek"=vbUseSystemDayOfWeek,thistakesthesettingfromtheControlPanel,Region.*Numericvalueofeachdaydependsonsettingofthefirstdayofweeksetting*YoucanusetheMONTHNAMEfunctiontoreturnthedayofthemonthasastring.*YoucanusetheWEEKDAYfunctiontoreturnthenumberrepresentingthedayoftheweekforagivendate.*Theequivalent.NETfunctionisMicrosoft.VisualBasic.DateAndTime.WeekdayName*FortheMicrosoftdocumentationrefertodocs.microsoft.comDebug.PrintWeekdayName(1)'MondayDebug.PrintWeekdayName(1,False)'MondayDebug.PrintWeekdayName(1,True)'MonDebug.PrintWeekdayName(1,,vbDayOfWeek.vbUseSystemDayOfWeek)'MondayDebug.PrintWeekdayName(1,,vbDayOfWeek.vbMonday)'MondayDebug.PrintWeekdayName(1,,vbDayOfWeek.vbSunday)'SundayDebug.PrintWeekdayName(2)'TuesdayDebug.PrintWeekdayName(2,True)'TueDebug.PrintWeekdayName(2,True,vbDayOfWeek.vbMonday)'TueDebug.PrintWeekdayName(2,True,vbDayOfWeek.vbTuesday)'WedDebug.PrintWeekdayName(2,True,vbDayOfWeek.vbWednesday)'ThuDebug.PrintWeekdayName(1,,vbDayOfWeek.vbUseSystemDayOfWeek)'Monday©2021BetterSolutionsLimited.AllRightsReserved.©2021BetterSolutionsLimitedTop



請為這篇文章評分?