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
pavan 14pavan 14 

Date and time Functions using Case

Getting error "Error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date". while creating workflow rule checking condition forcustom object feild Created date and implement the rule only during mon.tue,wed,thurs,fri using CASE function.please help or correct

CASE(
MOD(  CreatedDate - DATE( 1900, 1, 7 ), 7 ),

1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",
"None"
)
Best Answer chosen by pavan 14
karthikeyan perumalkarthikeyan perumal
hello 

Use below formula

CASE(
MOD(CreatedDate - DATETIMEVALUE("1900-01-07 12:00:00"),7),

1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",
"None"
)

Hope it will help you. Mark Best ANSWER if its work for you.


Thanks
karthik