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;