The DateTimePicker control, if you set the value Short
to the property Format
, will be formatted as the short date format set in the computer's regional settings.
You can force it to have the same format regardless of the computer and its locale by setting the property Format
as Custom
and specifying in the property CustomFormat
the format to be used, for example "dd/MM/yy"
for your case.
In any case, the format in which the dates are displayed should not affect the code of your application. The dates should be handled in variables of date data type and not as chains. They should only be converted to chains to show them to the user (on the screen, reports, ...) but not when handling them in your code (for example to filter data).