I have a field and if the user tries to edit after 17:00 hours, error should be displayed that "You cannot modify after business hours"
Can any one help me how to write the validation rule for this.
Thanks in advance
Evaluate the if the field was changed using the ISCHANGED(field) operator, and compare the current time to your desired time using !Now().
You should be able to validate based on Modified or Created Date. Samples of formulas like that are here:
http://help.salesforce.com/apex/HTViewSolution?id=000005091&language=en_US
However note that the time zone of that date might not be the same as your users. This may or may not be a problem depending on how you are asserting the rule.