You need to sign in to do that
Don't have an account?
Benjamin_Pirih
Message Edited by Benjamin_Pirih on 03-20-2008 08:53 AM
Validate Time of Date/Time field
Thanks for help in advance!!
I have two fields on a custom object, startDate, endDate which a user inputs.
i.e. startDate: 3/24/2008 9:05 a.m. endDate 3/26/2008 9:05 a.m.
notice that the start date is less than the end date but the times are equal, bad user.. This information is used to create multiple events for each day.. My users are having a hard time getting the timespan concept, and seem to keep doing this.
So how can i validate this to prevent this problem..
the simple
IF(Date_Start_Time__c >= Date_End_Time__c , true, false)
will not cut it here.. with the multiday issue.. I do not see anything in the validation that applies to time??
Thanks Again!!
Message Edited by Benjamin_Pirih on 03-20-2008 08:53 AM
I'm sorry Benjamin, I may be misreading your post.
Did you say that the start date is greater than the end date?
I don't see that in your example.
On to the dirty work though.
First thing I want you to remember when doing any rules within Salesforce is that the IF() statement is partly implied by the coding which Salesforce uses.
When a formula evaluates to true, it will automatically trigger your rule.
Example:
IF(Date_Start_Time__c >= Date_End_Time__c , true, false)
will trigger the rule no differently than
Date_Start_Time__c >= Date_End_Time__c
This may seem very trivial but, it is very irritating when you receive the error "Your compiled formula contains 5,251 characters. Maximum allowed compiled characters is 5,000." This is one way to cut back on the use of characters.
Message Edited by Benjamin_Pirih on 03-20-2008 08:54 AM
Message Edited by Benjamin_Pirih on 03-20-2008 08:58 AM