Convert string to datatime format

1.

string str = "24/10/2008";
DateTime dt = DateTime.ParseExact(str, "dd/MM/yyyy",
                                 
Thread.CurrentThread.CurrentCulture);


2.

DateTime date = System.DateTime.ParseExact(str, "dd/MM/yyyy", null);
DateTime date = System.DateTime.ParseExact(str, "HH:mm:ss", null);

0 comments:

Listen to nirmaln - sakara - playlist audio songs at MusicMazaa.com