USER :DateUtils
使用 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;

Last modification:January 5th, 2014 at 10:12 pm
如果觉得我的文章对你有用,请随意赞赏