0

I want to extract my datetime value into different. I want to get day from the datetime value. eg: if datetime value is 2012/02/03 10:12:02 Tue. I want Tue from datetime. Is this possible.

3
Datetime myDateTime = datetime.now();
System.debug(myDateTime.format('EEE'));

Outputs "Tue". Use "EEEE" for "Tuesday" (it will be always in English even if user's preferred language is different.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.