Wednesday, March 28, 2007

Convert String To Date Format

private void Form1_Load(object sender, System.EventArgs e)
string s="3/23/2007";//DateFormat -MM/DD/YY
DateTime dt=new DateTime();
if(s!=null && s.Trim()!="")
dt= System.Convert.ToDateTime(s);

No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.