Following up from my last question, I still get the error whenever I run it on a system with a different date/time format. I am using a Date Edit, and a Time Edit-box to select my date and time value. The Date Edit is formatted as dd-mm-yy, and my Time Edit is formated as hh:mm. When I save them to the TDateTime variable dtLastOnline I get the ‘xx-xx-xx is not a valid date and time value’ error.
I set my dtLastOnline like dtLastOnline := dedtLastOnline.Date + tpLastOnline.Time;
How to I make sure my app has the same Date/Time format wherever it is being run from?
I tried setting the ShortDateFormat, LongDateFormat, etc, but that won’t work.
Thanks!
I tried with two TDateTimePickers, one set to hold a data, and one to hold a time. Is that what you are doing?
I find that the following works for me with no errors:
The output is: