Changing default date by time

H

hotplate

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

Michel Walsh

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
 
H

hotplate

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
 
Top