0

I want to send remainder to contact owner on the contact birthday date.I want formula to calculate whether the date is falling on weekend so that if it is Saturday I would send 1 prior and Sunday 2 prior notifications

Can I have formula to check whether the date is falling on weekday or weekend

3
  • I want to send email to the contact owner saying that he has birthday remainder if the contact birthday comes on weekdays the email would be sent on the same day else if it falls on Saturday email would be sent one day before. if the birthday falls on Sunday 2 before can i know how to achieve the logic
    – user6833
    Oct 27, 2014 at 11:32
  • Given all your requirements, this is probably easier done in an apex class than in a formula field with a workflow rule.
    – eyedar
    Oct 28, 2014 at 3:45
  • I want send a remainder to the contact owner for birthday remainder for the field birthday in the contact object. If the birthday falls on week day notification has to be sent on the same else if on Saturday one day before and else if on Sunday two days before can i know how to achieve the above logic
    – user6833
    Oct 28, 2014 at 5:44

1 Answer 1

1

To find the day of the week from a Date value, use a known Sunday (e.g. January 7, 1900) and subtract it from the date (e.g. TODAY()) to get the difference in days. The MOD() function finds the remainder of this result when divided by 7 to give the numerical value of the day of the week between 0 (Sunday) and 6 (Saturday). The formula below finds the result and then returns the text name of that day.

CASE(   MOD( date - DATE( 1900, 1, 7 ), 7 ),   0, "Sunday",   1, "Monday",   2, "Tuesday",   3, "Wednesday",   4, "Thursday",   5, "Friday",    "Saturday" )

More date formula help: http://www.salesforce.com/us/developer/docs/usefulFormulaFields/Content/formula_examples_dates.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.