I am sure that the above PHP code will work. And ultimately, I may have to use it. But the PHP code above uses EE’s Entry_Date and Expiration_Date both of which mean having to input the date. That is what I am trying to avoid, and is more work than I need to do.
I am trying to avoid using any DateTime type of field and just want to input the time. For some reason EE, MySql and MS Access all have a DateTime field with which one can subtract one time from another, but not at simple Time field with which to do the same. I do not want to have to type the Year, Month and Date every time I enter the time.
With the application I have in mind, I have to enter the Start Time and End Time each day, 5 days a week for 45 students for a year. If I could just type the time without the date part I save 22 keystrokes per record and a lot of time. Adding 09:30 or 15:30 versus 04/10/11 09:30 AM is a big difference (9,000 keystrokes every two weeks). And the extra keystrokes can introduce errors. Sometimes I can not do the typing daily and have to do a whole week’s worth at one sitting.
It is frustrating that in order to work with time I must add the Date when it has nothing to do with what I am doing. Even if I was not going to do calculations with the time, even if I was just going to input the time, I have no desire to input a date. I could add one separate date field if needed and not have to input the date twice (Start Time and End Time).
Surely, I am not the only person who wants to subtract one time from another based on a 24 hour day without wanting to enter the Date? Am I? Your thoughts on this matter are appreciate. I will use the above code on one of my websites which already uses Entry_Date. A million thanks for the code.
Jose