Hi folks,
I am a newbie here. I am not very good in programming. I just want little help in generating an output if I create a form and input certain fields.
Basically I need the code for this output.
The requirement is :-
I have to input a date ' D' with shifts 'S' like A,B,C
A =8 hours (6am to 2pm), B = 16 hours (2pm to 10pm), C = 24 hours ( 10pm to 6am).
Also, I will input the height of anode in 'H' cm (a consumable material).
The basic consumption pattern is 1cm in every 16 hours.
And I want to remove the anode when the left over height is 20cm. Basically, I need the output date and shift when I should remove the anode.
Output 'O, = ? in Date and Hours
For example,
D = 08 Jan 2109
S = A = 8
H = 48 cm
Then,
As per consumption pattern
48-20 = 28 cm
28cm * 2 shifts = 56 shifts
[1 day = 3 shifts]
56 shifts = 18 days 2 shifts
So, the output should be
8 Jan A (8 hours) + 18 days 2 shifts
= 26 Jan C (3rd shift)
Please write a code to generate the output date and shift in format (Date + A/B/C shift).
Thanks in advance.