Calculating Date based on Day & Time

forms_are_nightmares

Registered User.
Local time
Today, 13:00
Joined
Apr 5, 2010
Messages
71
I've searched the threads and even tried to find the answer on the Internet. If I missed the solution, I apologize. I've been looking to the point where it has all know become mud.

Here's what I want to do:

[RDate] is a field on the form that essentially will be the request date.

When a user opens a form, I want the [RDate] field to auto-calculate based on these 3 scenarios:

1) If the current time is after 3pm and the day of the week is between monday and thursday, then [RDate] = Date + 1

2) If the current time is after 3pm and the day of the week is Friday, then [RDate] = Date + 3

3) If the current time is before 3pm, then [RDate] = Date

If anyone can point me in the right direction, I would appreciate it.
 
You can test the time with the Hour() function, and the day with the WeekDay() function (both using the Now() function). With some If/Then logic in the On Current event, you should be able to populate your data appropriately.
 
Thanks Paul,

That was just the nudge I needed. Works fine.
 
Happy to help. See, forms aren't really nightmares! :p
 

Users who are viewing this thread

Back
Top Bottom