I have three text boxes. (1) Start time | (2) End Time | (3) Shift - Read Only
I want to automatically set the value of txtShift to DAY or NIGHT only depending on txtStart and txtEnd.

Am not requesting of a specific/perfect code for this problem, just want you guys to help me out on how should i solve this.

Please help. Thank you in advance.

Recommended Answers

All 2 Replies

Generically it would be

    txtShift.Text = "DAY"
    txtShift.Text = "NIGHT"
End If

I can't be more specific than that because I don't know what range of values defines DAY or NIGHT. If there are a restricted set of possible values then you would be better off using a drop down list to select the values. Can you provide more info?

Shift Range: Start Time ~ End Time

DAY -- 0800H ~ 2000H
NIGHT -- 2000H ~ 0800H

User is allowed to input any time within the range.
[Start time] 13:20
[End Time] 14:25
Therefore, shift will be DAY

Do you recommend using drop down list for this case? or text box perhaps?
Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.