Hi,

Thanks for having a lok at it and finding the errors, it was a fking mess.

Those variables were all mixed up, i wrote one, then rewrote at work as i didn't have the original files then today i sort of managed to merge them both and destroy them at the same time while losing both files clever huh.

The variables...should be dayNo, MonthNo and YearNo(the user inputs)

I then have maxday (max no of days per month) the others were left over from the other and have been removed. I may need another depending on the leap year, whether that is used as a seperate proc or not.

I've not touched on functions yet and to be honest...don't really have a clue how they work, will be reading up on them tomorrow.
It looks like it takes global variables / procedure and makes it one instead of many..?

It shouldn't have been doing the check if month was incorrect, my mistake.

I also havent got maxday to work properly yet. So far the best I have is where it will ask for a correct day and/or month before giving output. I think I need to put a loop/repeat around the error handling bit in case someone types in 13 twice as a month.

Sorry about the indentation. -have amaended some.
Code:
program EX10DATEVALIDATIONSG(input,output);
uses    crt;
const   Title:string = '                              EX10 DATE VALIDATION          ';
        By:string =    '                                 By Steve Green     ';

var     dayNo,monthNo,yearNo:integer;
        maxdays:integer;

        month:string;
        monthnames: array[1..12] of string = ('January','February','March','April',
        'May','June','July','August','September','October','November','December');

procedure menu;
begin
        ClrScr;
          textcolor(red);
           writeln(Title);
           writeln;
           writeln(by);
           writeln;
          textcolor(green);
           writeln;
           writeln('Hello, My name is Menu.');
           writeln('I am here to make things easier');
           writeln('To exit the program press 0');
         writeln;                       //seperate procedure?
         writeln;

end;
procedure cont;
begin
        writeln;
        writeln;
        writeln;
         textcolor(red);
          writeln ('Press <Return> to continue');
           readln ();
end;


procedure monthcheck;

begin
      case monthNo of                               {This section gives the}
         4,6,9,11: maxdays := 30;                  {months their correct lengths}
         1,3,5,7,8,10,12: maxdays := 31;
         2: if yearNo mod 4=0 then maxdays :=29
         else maxdays := 28;
       end;
end;


procedure daycheck;
begin
case dayNo of
         1,21,31: write (dayNo,'st');        // sets prefix for day
         2,22: write (dayNo,'nd');
         3,23: write (dayNo,'rd');
         4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,24,
         25,26,27,28,29,30: write(dayNo,'th');
         end;
end;


begin {main program}

          menu;
           write('Please enter the date to continue, enter in this format, 00 00 0000.');
           writeln;
           readln(dayNo,monthNo,yearNo);

         if (dayNo<=0) or (dayNo>31) then
            begin
              writeln('Sorry, There are only no of days in this month!');  //error handling
              writeln('Please enter another day');
              readln(dayNo);
            end;
         if (dayNo>=1) or (dayNo<=31) then
            daycheck;


         if (monthNo <=0) or (monthNo >12) then
           begin
             writeln('Sorry, There are only 12 months in a year!');
             writeln('Please enter the month again');
             read(monthNo);
           end;
         if (monthNo > 0) and (monthNo <= 12) then
            monthcheck;
              write('   ',monthnames[monthNo]);

         write(' ',yearNo);

          writeln;
          writeln;
          cont;

end.