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');
Oops
Quite right Tealwren you don't need the datetimepicker.
My first thought was that it would know the day of the week in any year, and it got left in somehow!!
Looking again at the original question I am not sure if that is what he wanted though !!
Steve.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.