Well, if I introduce the date 29/01/2008 in the next code, a window appears with the message "Proyect project1.exe raised exception class EconvertError with message “2008/01/29’ is not a valid date’. Process stopped . Use Step or Run to continue."

repeat
            writeln('          Introduce the day');
            readln(day1);
            until(day1>'0')and(day1<'32');
            repeat
            writeln('          Introduce the month);
            readln(month);
            until (month>'0')and(month<'13');
            repeat
            writeln('          Introduce the year’);
            readln(year);
            until (year='2008');

            mystring:=year+'/'+month+'/'+day1;

            day3:=StrtoDate(mystring);

Why?

Add writeln( ShortDateFormat ); to your code and see if it reads something like yyyy/m/d .

Also please look again at this thread, down at the bottom of the first post where it says "Convert From A String".

Sorry I've been so busy, altzaportu. I'll respond to you more later...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.