Saturday, 29 October 2011

Find Day of the week in Salesforce

Any of the following date formats can be used to calculate the day of the week .


String shortDayOfweek = DateTime.now().format(‘EEE’); // ‘Sat’
String longDayOfweek = DateTime.now().format(‘EEEEE’); // ‘Saturday’

No comments:

Post a Comment