Hi jlaw
This wont help if you are doing some sort of college project, but this is probobaly the simplist way to do it.
Use a Datetime picker component for the W32 pallet.
according to the help file it should be possible to get the day of week directly from the component!! but I cant find it so.
This works by reseting the datetime picker calender back 1 year,reading the new date, then using the dayofweek function to index an array of day's.
If you need to show that you can do the calcs, get hold of 'A crash course in Pascal' can't remember the authour.
there is a nice formula and example in the book.
var
Form1: TForm1;
const days: array [1..7] of string =('Sunday','Monday','Teusday','Wednesday','Thursday','Friday','Saturday');
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var ndate: Tdate;
year,mth,day: word;
begin
dtp.DateFormat := dflong;
decodedate(now, year,mth,day);
dec(year);dtp.Date := encodedate(year,mth,day);
edit1.text := days[dayofweek(dtp.date)];
end;
end.
Hope it helps Steve.