The problem with the hour argument is that the time needs to be specific and not determined relative to the time of the entry. Sorry... does that make sense?
Pretty much. You are printing up instructions for a staff member to administer meds to someone under professional care, or something like that.
A DATE data type in Access is a DOUBLE (scientific) number that has been
adapted to represent a date and time. (We call the adaptation a "TYPECAST", where one type has been cast in a different role.) The DATE field's number, like any scientific number, has two parts - an integer and a fraction. The integer is days since a reference date. The fraction is the fraction of the day with midnight being 0 and noon being 0.5, and also note that though a DOUBLE has enough bits to store fractions of a second, the
formatting routines stop at seconds either way. And from your general description, it would appear to me that even seconds don't make a difference.
Office VBA reference topic
learn.microsoft.com
You have several choices.
If you want to just display a time of 8:00 AM, use
FORMAT( (8/24), "Medium Time" ) and for evening times such as
8:00 PM, use
FORMAT( (20/24), "Medium Time" ) (i.e. 8 PM in military time is
20:00) If you have a DATE field or value and you want to SET the time, it takes two parts in the expression:
datetimefield = DATE( date-field-value ) + (8/24). The DATE function strips only the time off of the DATE field/value, leaving it at midnight of that date. Then you can add back the fraction. Unfortunately, if your fraction is more complex, like "half past 9 AM" then the fraction gets uglier.
As an alternative you can generate all of this by just having string constants available that you just tack on to the text form of the date, if that is what you need. I.e. if this is only needed for printing, then store the required constants and pick the one you need.
If you really,
really want to make the date variable include the time and you wanted to add it, the correct expression involves something called a type tag. For dates, it is the pound-sign or octothorpe (#). There are other tags, but this is the one I think YOU need.
datefield = DATE( date-field-value) + "#08:00:00#"
The reason that you got nowhere with
+ "08:00:00" is because that is a STRING data type that you are trying to add to a DATE data type and you get a type mismatch. Including the type hint tags makes the content of that string be interpreted as a time of day.