I have a date coming from a database as a string. I want to set it to a datetimepicker.
The problem is, it can be in many formats, such as:
d/m/yyyy
d/mm/yyyy
dd/m/yyyy
dd/mm/yyyy
I don't know how to do it.
If I can convert this to something like dd/mm/yyyy
I can show it in datetime picker.
How can I do this programmatically ?
You can parse it like that: