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
willingwilling 

To find day of the week

I have to calculate the number of days a case has been in a perticular status and if it is a High Priority case then it needs to consider weekends as well and for all other priorities it needs to ignore the weekends and then see how long a case has been in a perticular status.
Has  any one worked on similar situation and is there a way I can see what is the Day ( Monday, Tuesday, Wednesday etc)  on a perticular date ?

Any help is appricaited.

Thanks
Ron HessRon Hess
Use Datetime.format( javaformat_string ) to find the day of the week
 you may have to convert a date to a datetime.

http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

so, something like this :

string day_of_week = myDate.format( 'EEE' );
system.debug( day_of_week );


willingwilling
Thanks, it worked.