How to pass values to a dateTimePicker control
Hello everyone,
i have a String^ in the format of DD/MM/YYYY and i wanna pass that value to set the date of a dateTimePicker control.
i know the code is
Code:
dateTimePicker1->Value = DateTime(YEAR, MONTH, DAY);
but my problem is splitting the date String^ into 3 seperate strings(YEAR, MONTH, DAY).
I need help on how to do this. Mind you, sometimes the string format is
D/MM/YYYY (like today 4/11/2007) and other times
DD/MM/YYYY (eg 25/10/2007).
Same applies to the month,
DD/M/YYYY(10/1/2007) and
DD/MM/YYYY(10/12/2007).
Thank You.