//取当月的第一天
function TDealWithXML.FDOM(Date: TDateTime): TDateTime;
var
Year, Month, Day: Word;
begin
DecodeDate(Date, Year, Month, Day);
Result := EncodeDate(Year, Month, 1);
end;

//取当月的最后一天
function TDealWithXML.LDOM(Date: TDateTime): TDateTime;
var
Year, Month, Day: Word;
begin
DecodeDate(Date, Year, Month, Day);
if Month < 12 then inc(Month)
else begin Month := 1; inc(Year) end;
Result := EncodeDate(Year, Month, 1) - 1;
end;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-06-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-08
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案