changing a date based on the time of day

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all, I'm working on a database to track when mail comes into an office and
put a date stamp on it so we can track how much of each type of mail is
coming in and worked each day. I'm trying to create a function for this date
stamp where if the entry is put into the database after a certain time of day
(i.e. anytime after 4 pm) then the date applied will be for the following day
as opposed to today. Any help?
 
Hi all, I'm working on a database to track when mail comes into an office and
put a date stamp on it so we can track how much of each type of mail is
coming in and worked each day. I'm trying to create a function for this date
stamp where if the entry is put into the database after a certain time of day
(i.e. anytime after 4 pm) then the date applied will be for the following day
as opposed to today. Any help?

You could set the DefaultValue of the form control to

=DateValue(DateAdd("h", 8, Now()))

A more complex function will be needed if you want mail arriving Friday
afternoon at 4:30 to get stamped with the next Monday's date... but it's
certainly doable.

John W. Vinson [MVP]
 
Back
Top