Split Date and Time Separate using Dataset

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1239
Hi
I have post
Split Date and Time Separate using Dataset.

DataSet ds=new DataSet ();
SqlDataAdapter sqlmd = new SqlDataAdapter("Select * from Table_2", con);
sqlmd.Fill(ds);
string StDate = "";
string STime = "";
string Speriod = "";
string test1 = ds.Tables[0].DefaultView[0][1].ToString();
StDate = test1.Split(' ')[0];
STime = test1.Split(' ')[1];
Speriod = test1.Split(' ')[2];
Response.Write(" Date : " + StDate + " Time : " + STime + " " +Speriod);

Comments or Responses

Login to post response