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
bozotheclownbozotheclown 

Identifying Day of Week???

Hello.  Does anyone know if it is possible to identify the day of the week for a particular date via Apex?  I thought this would be pretty simple given the various date methods available, but I am not able to find anything.

 

I am familiar with the various date methods - and I know I can return the month (such as "January" etc).  However, I am trying to return the day of the week - such as "Tuesday", "Thursday" etc.

 

Any thoughts?  Thanks in advance.  Hopefully I am just missing something pretty simple.

Best Answer chosen by Admin (Salesforce Developers) 
Naidu PothiniNaidu Pothini
String weekday = System.now().format('EEEE');

 Try this.

All Answers

Naidu PothiniNaidu Pothini
String weekday = System.now().format('EEEE');

 Try this.

This was selected as the best answer
Nilesh ManeNilesh Mane

You can find the solution on.

 

http://nileshthedeveloper.blogspot.in/

bozotheclownbozotheclown

Thanks