I am very much new to delphi and i tried the following code
procedure TForm1.Button1Click(Sender: TObject);
var
myDate : TDateTime;
day : string;
begin
myDate := EncodeDate(2002, 12, 31);
day := LongDayNames[DayOfWeek(myDate)];
ShowMessage('Christmas day 2002 is on a '+day);
end;
I have declared System.SysUtils
in Uses
section but still i am getting the error Undeclared identifier.
I am using Delphi XE3 17.0