You need to sign in to do that
Don't have an account?
Coral Racing
Validation Rule Help with a DATE / Time
Hello,
I have a date time field that users manually select for when they want to implement a Change but I want to limit their selections to only Monday, Wednesdays and Fridays of each week.
Can anyone help?
Many Thanks
Sonya
I have a date time field that users manually select for when they want to implement a Change but I want to limit their selections to only Monday, Wednesdays and Fridays of each week.
Can anyone help?
Many Thanks
Sonya
I am not sure if you are looking for the full logic of the validation Rule or just the way to get the Day of the week in validation.
In case you are trying to find a way to get the days then,
Please use this link:
https://help.salesforce.com/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_US#getting-dmy-from-date
Here under the section - 'Finding and Displaying the Day of the Week From a Date' you can find a way to do so.
Hope it helps!!
If you still need more help you can tell.
Regards,
Vibhor
Please find the below validation rule,
NOT(OR(MOD( TestDate__c - DATE(1900, 2, 3), 7) = 2, MOD( TestDate__c - DATE(1900, 2, 3), 7) = 4, MOD(TestDate__c - DATE(1900, 2, 3), 7) = 6))
Replace TestDate__c with your date field.
Thanks,
Vinoth
Much apprciated
I have made few changes for Date Time field. Please find the below formula.
NOT(OR(MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 2, MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 4, MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 6))
Thanks,
Vinoth
NOT(OR(MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 2, MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 4, MOD( DATEVALUE(TestDate__c) - DATE(1900, 2, 3), 7) = 6))
NOT(
OR
(MOD((CAB_Date__c) - DATE(1900, 2, 3), 7) = 2,
MOD((CAB_Date__c) - DATE(1900, 2, 3), 7) = 4,
MOD((CAB_Date__c) - DATE(1900, 2, 3), 7) = 6)
)