Hi Tim,
Thanks for using Syncfusion products,
We do not have the direct support to split the DateTime column as a Day, Month and Year from DataSet. But you can achieve your scenario by converting the dataset to DataTable. Please refer the below code snippet, refer the below screenshot and refer the attached sample,
Code snippet
DataTable ds = new DataTable();
String commandstring = "select * from Employees";
String connection = @"Data Source=" + FindFile("NorthwindwithImage.sdf");
SqlCeDataAdapter da = new SqlCeDataAdapter(commandstring, connection);
try
{
da.Fill(ds);
}
catch (SqlException ex)
{
MessageBox.Show(ex.ToString());
}
ds.Columns.Add("Date");
ds.Columns.Add("Month");
ds.Columns.Add("Year");
for (int i = 0; i < ds.Rows.Count; i++)
{
DateTime date = Convert.ToDateTime(ds.Rows[i]["BirthDate"]);
ds.Rows[i]["Date"] = date.ToString("dd");
ds.Rows[i]["Month"] = date.ToString("MM");
ds.Rows[i]["Year"] = date.ToString("yyyy");
}
Screenshot
Please let us know if we misunderstood your query.
Regards,
Mohanraj G.