i have activereport 6 and C# and i try to add 6 days to textbox1 value/text this is what i try
string text1 = this.textbox1.Text;
i also try
string text1 = this.textbox1.Text.ToString();
or string text1 = this.textbox1.Value
convert string to time
DateTime date1 = Datime.Parse(text1);
i keep getting error "target of invocation" how do i convert textbox data string to datetime? or how do i fix that target of invocation error?
That should be the correct way to get the text value from the textbox, as it is already a string.
From there you should be able to use the standard .NET methods to convert it to a DateTime. The way you did it looks correct to me based on Microsoft's docs. However, that's assuming the format your string is in is one of the formats the DateTime.Parse() method understands by default. Example from their docs:
If your string is in a different format from one of the handful that DateTime.Parse understands by default you may need to use a custom format, and I believe that could be the source of the error you're receiving.