Click here to Skip to main content
14,635,895 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello,
I am creating a software which would find out the production complete date based on start date.
This will be working like it would find out the total hours required to complete the production and then add it to start date.
I WANT TO KNOW
HOW to add hours based on how the Production shift is working. These checkboxes tell that weather the shift is working or not. If checkbox is checked it means shift is working, otherwise not.
Based on shift working, it would add the hours to date, For example
Based on Calculation the time required is 900 hrs, now if Monday and Tuesday only one shift is working then while calculating end date it would consider only 12 hours from this 900 hrs for Monday and Tuesday.

What I have tried:

production24 = ((rpm * 24 * 60) / (pick * 39.37)) * (eff / 100)
        production12 = ((rpm * addvalue * 60) / (pick * 39.37)) * (eff / 100)
        production1 = ((rpm * 1 * 60) / (pick * 39.37)) * (eff / 100)

        production24 = Math.Round(production24, 2, MidpointRounding.AwayFromZero)
        production12 = Math.Round(production12, 2, MidpointRounding.AwayFromZero)
        production1 = Math.Round(production1, 2, MidpointRounding.AwayFromZero)

        pro_24.Text = Convert.ToString(production24)
        Pro_12.Text = Convert.ToString(production12)
        Pro_1.Text = Convert.ToString(production1)

        If fl <> 0 And production1 <> 0 Then
            timereqinhr = fl / production1
        Else
            timereqinhr = 0
        End If



        getdate = DatePicker.Value + Time_Picker.Value.TimeOfDay
        falldate = getdate.AddHours(timereqinhr + offshift)

        fallingtime.Text = falldate.ToString("dd/MM/yyyy | hh:mm tt")
        Label9.Text = "Time required for " + fabric_Length.Text + " Meters"

        Dim productiontime, productionhr, productionmin As String
        productiontime = Math.Floor(timereqinhr / 24)
        productionhr = Math.Floor(((timereqinhr / 24) - productiontime) * 24)
        productionmin = Math.Floor(((((timereqinhr / 24) - productiontime) * 24) * 60) - (productionhr * 60))
        Label8.Text = (productiontime + " Days, " + productionhr + " Hours " + productionmin + " Min ")
Posted
Updated 21-Jul-20 15:44pm
v3
Comments
CHill60 21-Jul-20 8:27am
   
So what is your question?
The Digigraphy 21-Jul-20 9:03am
   
Hey Chill60, I have made the changes in Question. Please see the updated question

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Not 100% sure what your asking for, it is 'this' ?
If prodShiftWorkingCheckBox.Checked = True Then
' Do the Calculation
' Display the Result Somewhere 
End If
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100