Skip to content

Instantly share code, notes, and snippets.

@emoran
Created May 6, 2014 14:54
Show Gist options
  • Save emoran/775c0c8371fa8c0029d6 to your computer and use it in GitHub Desktop.
Save emoran/775c0c8371fa8c0029d6 to your computer and use it in GitHub Desktop.
Start and End Date of each Month (Force.com apex)
Date firstDayOfMonth = System.today().toStartOfMonth();
Date lastDayOfMonth = firstDayOfMonth.addDays(Date.daysInMonth(firstDayOfMonth.year(), firstDayOfMonth.month()) - 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment