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
Bill clintonBill clinton 

How to fetch starting date of week

when i selecting the from date it will fetch starting date of a week
 in following text boxes
first textbox will be a start date of a week and following 6 textboxes continuous date of a week
ajay rawat 14ajay rawat 14
Hi 
You can use 

Date myDate = Date.today();
Date weekStart = myDate.toStartofWeek();

for(integer i=0;i<6;i++)
{
   weekStart +=1;
system.debug(weekStart); 
}

but it will be in date format so you have to format it properly (DD/MM//YYY)

Thanks
Ajay Rawat
 
Bill clintonBill clinton
thank you