unfortunately I have an irritating problem with the way DateTimePicker works. It returns a value of the type “DateTime”. And I should be able to convert this value into a string just as easily as Visual Basic does. But that does not work. It doesn’t work with the variant with “…SelectedDate.toString” as well as with the variant “…SelectedDate.SQLDateTime” if I want to write the date in the window title after selecting it. What am I doing wrong? I try to add a screenshot here.
Once we deploy our 2020r2.1 release you’ll be able to use SelectedDate too if you want to do it that way, even if you get Value as the parameter for the event. (Not been able to operate on SelectedDate was a bug in 2020r2.)
That is good to know. Because I did not get over this “SelectedDate” threshold. Mainly because it seems to work with the DatePicker in a web application with this reference.
Yeah, the main difference there (web) is that you aren’t receiving the selected date already as parameter in the Event; so in the case of Desktop, it would make more sense to rely in the already received “Value” parameter
Anyway, you’ll be able to do it also using SelectedDate!
I take note of this with pleasure. In general, I find it impressive how many improvements are brought into the development in a short time. But since I continue with PureBasic, SpiderBasic, VB.Net and VBA among others, the language references get mixed up.
When I use: DateTimePicker1.SelectedDate.ToString, I get the whole “19 Dec 2020 at 9:45:16 am” string , even when I am only displaying the date on the dateTimePicker field. Is there some way to force just the date to be entered without using substring prior to storing the data?