Question: I want code to find last day of the month. I want to make calendar.

Question:
Delphi give use native function for this.
Check this.

uses SysUtils, DateUtils;


function getLastDay : TDateTime;
begin
result := EncodeDate(YearOf(Now), MonthOf(Now), MonthDays[IsLeapYear(YearOf(Now)), MonthOf(Now)]);

end;


0 Responses so far.

Post a Comment

Thank you for your comment.

Any request and idea are welcome.

CLICK TO REGISTER