You need to sign in to do that
Don't have an account?
David Vaudreuil
Validation Rule to prevent a date being entered that's less than 24 hours notice
Hi Ladies and Gents-
I have a requirement for a custom object (Catering Requests) that I'm running into issues with. I want to create a validation rule that will prevent a user from entering a date for their requested catering delivery if it is less than 24 hours notice. So, if the current system time is 5:00 pm and the requested catering date = Tomorrow at 9:00am I want to throw an error. Any ideas on how to create that formula? The custom field is a date/time field called Meeting_Date__c.
Thanks!
I have a requirement for a custom object (Catering Requests) that I'm running into issues with. I want to create a validation rule that will prevent a user from entering a date for their requested catering delivery if it is less than 24 hours notice. So, if the current system time is 5:00 pm and the requested catering date = Tomorrow at 9:00am I want to throw an error. Any ideas on how to create that formula? The custom field is a date/time field called Meeting_Date__c.
Thanks!
All Answers
You can use the NOW() function for getting the current time. You validation will look something like
NOW() - Meeting_Date__c < 1.0
Please note that this formula is assuming that you and your users are in same timezone. In case the timezone is different you need to consider that in your calculation as well.