myspacee Posted March 11, 2010 Share Posted March 11, 2010 (edited) Hello to all, try to make a func that find Day of the Week from a given data. I must reconstruct week structure from folder archieve that store some file day by day using this format YYYYMMDD : 20100101 20100102 20100103 20100104 20100105 20100106 20100107 20100108 Find some info about calculation here : http://www.wikihow.com/Calculate-the-Day-of-the-Week Can anyone have some info, or help me with logic, to obtain stable FUNC for this task ? Thank you all for reading, m. find _DateToDayOfWeekISO that works well for this, ignore this post thank you Edited March 11, 2010 by myspacee Link to comment Share on other sites More sharing options...
JRowe Posted March 11, 2010 Share Posted March 11, 2010 Switch @WDAY Case 1 $day = "Sunday" Case 2 $day = "Monday" Case 3 $day = "Tuesday" Case 4 $day = "Wednesday" Case 5 $day = "Thursday" Case 6 $day = "Tomorrow" Case 7 $day = "Saturday" EndSwitch MsgBox(0, "Today", "The Day is: " & $day) That should do ya. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Rkey Posted March 11, 2010 Share Posted March 11, 2010 (edited) Or when using dates: #include <Date.au3> ; Week day number for a given date $iWeekday = _DateToDayOfWeek (@YEAR, @MON, @MDAY) ; Should be equal to @Wday MsgBox(4096, "", "Todays WeekdayNumber is: " & $iWeekDay) MsgBox(4096, "", "Today is a : " & _DateDayOfWeek($iWeekDay)) Edited March 11, 2010 by Rkey Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now