function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BuellBuell 

Created Day of the Week

Does anyone know a formula to show the day of the week a lead was created (ie monday, tuesday, etc.)?  I want to setup a workflow that will notify management when a lead has not been contacted within 24 hours of being created.  The problem lies in leads that are submitted over the weekend.
Best Answer chosen by Admin (Salesforce Developers) 
JakesterJakester
Try this:

Code:
CASE( MOD( datevalue(createddate) - DATE(1900, 1, 7), 7),
0, "Saturday",
6, "Sunday", "Weekday")

 

All Answers

JakesterJakester
Try this:

Code:
CASE( MOD( datevalue(createddate) - DATE(1900, 1, 7), 7),
0, "Saturday",
6, "Sunday", "Weekday")

 

This was selected as the best answer
BuellBuell
Fantastic!  Just need to switch Saturday & Sunday and it's perfect.  You saved me from having to try and wrap my head around  Zeller's congruence & Babwani's formula.  Thank you.
BuellBuell
For those that are curious.

Code:
CASE( MOD( DATEVALUE( CreatedDate ) - DATE(1900, 1, 7), 7),
0, "Sunday",
6, "Saturday",
2, "Tuesday",
4, "Thursday",
5, "Friday",
1, "Monday",
"Wednesday")