Time after 10:00PM bump to next day as date

cturner

Registered User.
Local time
Today, 09:47
Joined
Feb 7, 2005
Messages
21
I am trying to set the default in a feild to either be today's date if it is before 10:00pm but if it is after 10 PM i want ti to bump to the next day. I used this but I am getting an expression error. Any help?

= IIf ( Time()> 22:00:00 , DateAdd ("d", 1, Date()) , Date())
 
=IIf(Time()> #22:00:00# , DateAdd ("d", 1, Date()) , Date())
 
Thanks, It worked great. Sometimes the simplest things get me stumped. This site is wonderful for putting me back on track. Just one comment, when I entered the If statement it changed it to the following

=IIf(Time()>#10:00:00 PM#,DateAdd("d",1,Date()),Date())

Just in case someone else wants it.

Thanks again for your help.
 

Users who are viewing this thread

Back
Top Bottom