hai,
I have to convert a string to date and time.
the string is like "2013-08-09-16-50-59".
how to convert this string to date and time.
This way
string[] d = "2013-08-09-16-50-59".Split('-'); DateTime dt = Convert.ToDateTime(d[1] + "/" + d[2] + "/" + d[0] + " " + d[3] + ":" + d[4] + ":" + d[5]);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.