Posts

Showing posts with the label dayOfWeek

Salesforce Fact #717 | Day of week using reactive screen components

Image
Another use case related to reactive screen components. Suppose, we need to see the day of week for an input date value instantly in screen flow. We can use a formula resource to use WEEKDAY() function and use a text input to show the day of the week. Attached are the screenshots.

Salesforce Fact #675 | Get day of week in apex

Image
We can check day of week in apex class using the format() function of DateTime class.  If it takes the parameter 'EEE' corresponding to a datetime, it returns the abbreviated day name. And i f it takes the parameter 'EEEE' corresponding to a datetime, it returns the full day name. Attached is the screenshot.

Salesforce Fact #557 | Show dayofweek of selected date in LWC

Image
Suppose we have an input date field in LWC and we need to show the corresponding day of the week based on the selected date. We can implement the same using some JS logic. Attached are the screenshots.