Convert Date Format

public static DateTime ConvertDateFormat(string str)
{
int dd, mm, yy;
string[] strarr = new string[3];
strarr = str.Split(new char[] { '/' }, str.Length);
dd = Int32.Parse(strarr[0]);
mm = Int32.Parse(strarr [1]);
yy = Int32.Parse(strarr[2]);
DateTime dt = new DateTime(yy,mm,dd);
return (dt);

}

Comments

Popular posts from this blog

How to change value on selection of dropdown list control in datagid

Dictionary used for key value pair

Insert value from one table into exsiting table in oracle i.e merge