Changing default date by time

  • Thread starter Thread starter hotplate
  • Start date Start date
H

hotplate

How would I make the default value of current date change at 5am
instead of midnight?
 
Hi,



By definition, a default value is only used at the moment something is
created. So, something like

Date() + #05:00:00#


should do, in the relevant default property.


Now, if you mean that EXISTING values, already saved, have a midnight time
value, and, for those, you wish to use 5AM instead, someone can use an iif:


DateValue(myDateTime) + iif(0 =TimeValue(myDateTime) , #05:00:00#,
TimeValue(myDateTime) )



Hoping it may help,
Vanderghast, Access MVP
 
I think this should help, I just needed records recorded by 2nd shift
to all be on the date the shift starts. They will be adding new
records throughout the night.

Thanks
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top