Hi everyone. I have a situation (doesn't everyone in here? lol). I have a form that displays a lot-code date for a manufacturing process. In my plant, on 2nd shift, it is our policy that when the time passes midnight, the code does not change dates but keeps the same date. So I need to write a line of code that states that any production time between 12:01 am and 05:59 am will have yesterdays (Julian) date. The code looks this: "5401010420" where "104" represents the Julian Calendar date. The part that I don't understand is how to format the "time" in VBA in order to search for production between those 2 times. It must be "After midnight, BUT before 05:59am, and I have no way to specify the date part, only the time part. Any thoughts? On the form, there is a text box that displays the current date and one that displays the current time. I may be able to reference-off one of those?
Last edited: