1、USER :DateUtils

2、使用 StartOfTheMonth 和 EndOfTheMonth 函数获取即可;

复制代码
procedure TForm1.btn1Click(Sender: TObject);
begin
     mmo1.Lines.Add(FormatDateTime('yyyy-mm-dd',StartOfTheMonth(Now)));
     mmo1.Lines.Add(FormatDateTime('yyyy-mm-dd',EndOfTheMonth(Now)));
   //mmo1.Lines.Add(DateTimeToStr(StartOfTheMonth(Now)));
   //mmo1.Lines.Add(DateTimeToStr(EndOfTheMonth(Now)));
end;
复制代码