jitb Posted October 17, 2022 Share Posted October 17, 2022 I know I can't be the only one looking for The time difference on a 9/80 secdual (ie first week Mon-Thurs 9 hours, Fri 8 hours, second week Mon-Thu 9 hours Friday off) Any pointer will help ( I have searched the form and haven't found what I want) Link to comment Share on other sites More sharing options...
spudw2k Posted October 20, 2022 Share Posted October 20, 2022 Can you elaborate? The time difference between 9/80, and what? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
jitb Posted October 20, 2022 Author Share Posted October 20, 2022 Please see enclosed Excel file Time - Copy.xlsx Link to comment Share on other sites More sharing options...
spudw2k Posted October 21, 2022 Share Posted October 21, 2022 (edited) I saw it. What exactly are you trying to calculate/accomplish? Maybe this is something to play with. #include <date.au3> Local $iYear = 2022 Local $iMonth = 1 Local $iDay = 2 For $i = 2 to 15 Local $iHours = _Calculate9x80WorkHoursFromDate($iYear, $iMonth, $iDay) $sDayOfWeek = _DateDayOfWeek(_DateToDayOfWeek($iYear,$iMonth,$iDay),$DMW_LOCALE_LONGNAME) $sDate = StringFormat("%-24s", $iYear & "/" & $iMonth & "/" & $iDay & " (" & $sDayOfWeek & "): " ) ConsoleWrite($sDate & ((IsNumber($iHours)) ? $iHours & " hours" : $iHours) & @CRLF) $iDay += 1 Next Func _Calculate9x80WorkHoursFromDate($iYear, $iMonth, $iDay) ;Determine Day of the Week from Date YYYY MM DD $iWeekDay = _DateToDayOfWeek($iYear,$iMonth,$iDay) If @error Then Return -1 Local $iHours = "" Switch $iWeekDay Case 2 To 5 ;If Day of the Week is Monday - Thursday, Work hours is 9 $iHours = 9 Case 6 ;If Day of the Week is Friday, Calculate work hours based on Week number - Odd Week's are Off Fridays; Even week's work hours are 8 $iHours = (Mod(_WeekNumberISO($iYear, $iMonth, $iDay),2)) ? "Off Friday" : 8 Case Else $iHours = "Off day" EndSwitch Return $iHours EndFunc Edited October 21, 2022 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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