Error message 'Invalid text message'

When I use the function 'DatePicker' it comes with an error message (Invalid text message) but only when I use a date that is is equal to the Clock function 'call clock.Now' or 1 date newer.
(All other dates it will accept)

Can you please tell me what's happening ?

Per Saul

Please show us your blocks so some one can help you

.... and a screenshot of the exact message please.

Screenshot_20200724-144136 MIT App Inventor.pdf (193.4 KB)

MIT App Inventor.pdf (193.4 KB)

[MOD EDIT] Please post an image of your blocks directly (right click on blocks editor and download blocks as image, then edit if necessary). I have posted your blocks on this occasion.

I see - so it is actually your own code within a Date Picker Block.

The error is from one or more segment text blocks where you are trying to collect a segment that is actually longer than the original text. For example, if the text is six characters in length, you cannot collect a segment of ten characters.

So, before attempting to collect a segment, your code should verify that the text is the expected length. There is a text length block for that.

OK, I'll try wat you say and se of it works

I have now tried everything I possible could do.
That means;
with or without Variables in different ways
Text-fields in different ways
with or without "length" in front of 'Text' and in front of 'Variables'
and the reply from the system is still the same;
when I give a date that is lower or higher than the 'clock' date it show the correct date and how many years there are between the 2 dates.
But if I put the same date as the 'clock' date or 1 date higher in the 'DatePicker' the ERROR occurs (as shown before).
So I hope you can help me because it seems to me that the fault is in the system behind the 'Bloks' ?

More likely your blocks :wink:

Either share your aia project file here, or show all your blocks so we can see the procedure "SetDateToDisplay" and all the blocks in the routine. Someone may have time to go over this and find the issue.

OK, I am sending you what you ask for, but I have one remark more,
The reason that I am doing so is because, when I use the 'Instant' way of pulling to dates apart, is that if I don't do it this way, the 'number of years' is with decimals and I only want to see the number of years without decimals (I have to do this twice because, when it show me a date under 10 it stand with a ',' after the single number)
That is all

use Do it to debug your blocks, see also tip 4 here
see also Live Development, Testing, and Debugging Tools

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Of course it could be my blocks, but I can't figure it out.

Here you have all the blocks according to the problem.

I hope you can figure it out.MIT App Inventor1.pdf (194.6 KB) MIT App Inventor2.pdf (194.5 KB) MIT App Inventor3.pdf (176.5 KB) MIT App Inventor4.pdf (173.4 KB)

Please post images of your blocks to the forum (as previously requested!), do not supply links which only download - they could be anything!!

Right click in your blocks editor to get a download of your blocks as an image.

Thanks for the debug material, Taifun

OK I will do it tomorrow or monday

Well, now I have used the 'debug' function and the remarks from you, and I am sad to say,
that you were right and I was wrong, but
I had to use it 2 ways, both with the block 'lenght' and asking for real ciffer.
So that have helped me to understand and to solve my problem. So thank you for your help.