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

How to get day name from input month and year

Hi all,
i want to get day name from input month and year.

Can anyone help me out for this.

Shashikant SharmaShashikant Sharma
You could achieve it with below code in the Apex Class.
Date d = date.newinstance(1947,8, 15);  
datetime myDate = datetime.newInstance(d.year(), d.month(),;  
String day = myDate.format('EEEE');

Read this for more :